
[英]git push error:remote: error: cannot open .git/FETCH_HEAD: Permission denied
[英]error: cannot open /xx/.repo/manifests.git/FETCH_HEAD: Permission denied in repo init
我正在尝试在 Ubuntu(20.04)(VM) 机器上repo init
:
repo init -u git@github.com:xxx/manifest.git -b devl
得到错误:
... A new repo command ( 1.27) is available.
... You should upgrade soon:
cp /xxx/devl/.repo/repo/repo /usr/bin/repo
error: cannot open /xx/devl/.repo/manifests.git/FETCH_HEAD: Permission denied
Enter passphrase for key '/xxx/.ssh/id_rsa':
error: cannot open /xxxl/dev/.repo/manifests.git/FETCH_HEAD: Permission denied
fatal: cannot obtain manifest git@github.com:xx/manifest.git
在 github 中添加密钥,如下所示:
ssh-keygen -t rsa -b 4096 -C xx@xx.com
ssh-keygen -E md5 -lf ~/.ssh/id_rsa.pub
猫 ~/.ssh/id_rsa.pub
将 ssh 密钥复制到 github-> 设置--> ssh 和 GPG 密钥--> 新 ssh 密钥--> 并复制。
然后在 Ubuntu 机器“ssh -v git@github.com”中输入命令得到如下响应:
Hi xxx! You've successfully authenticated, but GitHub does not provide shell access.
debug1: channel 0: free: client-session, nchannels 1
Connection to github.com closed.
Transferred: sent 3744, received 2752 bytes, in 0.4 seconds
Bytes per second: sent 8392.9, received 6169.2
debug1: Exit status 1
在这种情况下repo init
失败的原因可能是什么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.