git push origin master拒绝错误权限(github)

Mic*_*ant 5 git ssh key github

错误:durrantm/linker.git的权限被拒绝给kevinzen.致命:远程端意外挂断

我已经尝试了很多改变/设置我的身份并摆脱'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 git@github.com:durrantm/linker.git
Run Code Online (Sandbox Code Playgroud)

我已将本地ssh密钥与我的信息(不是kevinz)添加到github ssh密钥.

我也尝试过: ssh git@github.com. 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

不确定PTY错误.仍然卡住了.

san*_*mai 8

你在GitHub上安装了密钥吗?你在那里看过帮助部分吗?

你可以列出你自己的密钥保存在GitHub上:

curl https://github.com/<username>.keys
Run Code Online (Sandbox Code Playgroud)

您是否检查过其中一个键是否与其中一个键匹配?相比:

cat ~/.ssh/id_*.pub
Run Code Online (Sandbox Code Playgroud)