我查了很多帖子,但没有任何帮助。git推显示错误的用户名
有一个远程回购是这样的:https://github.com/cakes/blue.git
全球gitconfig
是:
$ cat ~/.gitconfig
[user]
name = blake.shaw
[http]
sslCaInfo = C:/bin/certificate.crt
这需要一个证书,因此把它作为http.sslCaInfo
和证书已被添加到git的bin文件夹作为好。
克隆后,远程源URL设置为一样的东西:[email protected]:cakes/blue.git
的id_rsa和id_rsa.pub也创建。 id_rsa.pub已被添加到github(远程)中的ssh密钥中。
当我尝试做一个git push origin master
,它抛出一个错误:
ERROR: Permission to cakes/blue.git denied to blake-shaw
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
这里有两个问题:
在URL中的用户名说
blake-shaw
,而不是blake.shaw
。如何重置它?使用url作为尝试:
https://github.com/cakes/blue.git
和使用源代码树,试图推动,但随后抛出下面的错误:remote: Permission to cakes/blue.git denied to blake.shaw. fatal: unable to access 'https://github.com/cakes/blue.git/': The requested URL returned error: 403
感谢@VonC!第二个实际工作。我分叉回购并创建了一个拉请求。关于第一个问题,我已将id_rsa注册到blake.shaw的帐户,但后来我想我试图推到一个回购商店,因为我不是店主 – allout