git push origin master 给出错误权限被拒绝(github)
错误:kevinzen 的 durrantm/linker.git 权限被拒绝。 fatal:远端意外挂断
我尝试了很多方法来更改/设置我的身份并摆脱“kevinzen”
更新 - 最终解决方案是我添加了我的公钥......但是。 ..我错过了一些字符,所以它是无效的。在 github 上粘贴正确的密钥修复了它
我有 ~/.ssh/
和文件
config
id_dsa
id_dsa. pub
id_kb_rsa
id_kb_rsa.pub
id_rsa
id_rsa.pub
known_hosts
我已经完成了
git config --global user.name
git config --global user.email
git remote add origin [email protected]:durrantm/linker.git
,我已将本机的本地 ssh 密钥和我的信息(不是 kevinz)添加到 github ssh 密钥。
我也尝试过: ssh [电子邮件受保护]。 主机“github.com”的真实性。 (207.97.227.239)' 无法建立。 RSA 密钥指纹为 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48。 您确定要继续连接吗(是/否)?是的 警告:永久添加“github.com”。 (RSA) 到已知主机列表。 PTY 分配请求在通道 0 上失败
不确定 PTY 错误。还是卡住了。
ERROR: Permission to durrantm/linker.git denied to kevinzen.
fatal: The remote end hung up unexpectedly
I've tried a lot of things to change/set my identity and get rid of that 'kevinzen'
Update - final resolution was that I had added my public key... but... I had missed a few characters so it was invalid. Pasting in the correct key on github fixed it
I have ~/.ssh/
with files
config
id_dsa
id_dsa.pub
id_kb_rsa
id_kb_rsa.pub
id_rsa
id_rsa.pub
known_hosts
I have done
git config --global user.name
git config --global user.email
git remote add origin [email protected]:durrantm/linker.git
I have added my local ssh key with my info (not kevinz) for this machine to github ssh keys.
I also tried:ssh [email protected].
The authenticity of host 'github.com. (207.97.227.239)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com.' (RSA) to the list of known hosts.
PTY allocation request failed on channel 0
wasn't sure about the PTY error. Still stuck.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否在 GitHub 上安装了密钥?您读过那里的帮助部分吗?
您可以列出 <一个href="https://github.com/settings/keys" rel="nofollow noreferrer">您自己保存在 GitHub 上的密钥:
您是否检查过其中一个密钥与您的密钥之一匹配钥匙?比较:
Did you install your key at GitHub? Have you read help section there?
You can list your own keys as saved at GitHub by:
Have you checked that one of the keys is a match to one of your keys? Compare:
我有同样的问题,我的解决方案很简单。我已经有了我的密钥设置和一切,并继续尝试运行:
查看我的 ~/.ssh/ 之后,我注意到正在运行:
我看到只需使用正确的 git 帐户,我刚刚添加了正确的文件:
...然后
git Push origin master
工作正常。我的 ssh 配置上有一个别名,可以为我的工作和个人使用不同的密钥,但由于某种原因仍然必须执行此步骤。I had the same problem, my solution was simple. I already have my keys setup and everything and kept trying to run:
After looking through my ~/.ssh/ I noticed that running:
I saw that to simply use the right git account I just added the right file:
... then a
git push origin master
worked fine. I have an alias on my ssh config to use different keys for my work and personal, but still had to do this step for some reason.