repo init相关

repo init

repo init失败时,用一个本地账户可以,另一个本地账户不可以,基本上是配置问题。

repo init iu ssh://xxx.xxx.xxx.xxx:xxxx/projectName/manifest -b branchName --repo-url=ssh://xxx.xxx.xxx.xxx:xxxx/git-repo-version

常见的失败信息如下:

Perrmission denied(publickey).
fetal:Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.

解决方法

1、repo init时指定用户信息

repo init iu ssh://username@xxx.xxx.xxx.xxx:xxxx/projectName/manifest -b branchName --repo-url=ssh://username@xxx.xxx.xxx.xxx:xxxx/git-repo-version

2、设置ssh的配置文件

为.ssh目录设置权限

chmod 600 ~/.ssh/config

config文件配置十分简单,只需要按照以下格式配置即可。

config文件需要放到 ~/.ssh/config

Hostwork1
    HostName xxx.xxx.xxx.xxx
	User root
	Port xxxx

Hostwork2
    HostName xxx.xxx.xxx.xxx
	User root
	Port xxxx

对指定的Project列表或所有Project执行命令COMMAND,加上-p参数可打印出Project的路径。

repo forall -c 'git reset --hard HEAD;git clean -df;git rebase --abort'
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值