无法推送到Github,获得“许可被拒绝(公钥)”

时间:2013-03-09 07:36:17

标签: git ssh public-key github-for-windows

Administrator@SANZVAIO /e/projects/pySan (master)
$ git remote add pySan git@github.com:sanfx/.git

Administrator@SANZVAIO /e/projects/pySan (master)
$ git push -u origin master
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,207.97.227.239' (RSA) to the list of know
n hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

推送到github的其他任何方式?我在Windows 7上使用Git Bash。

1 个答案:

答案 0 :(得分:2)

  1. 您的回购网址错误
  2. 您可能还有SSH问题。
  3. 您应首先通过the webinterfaceGitHub API

    在GitHub上创建一个空存储库

    假设您刚刚创建了myrepo,要使用的URL语法是:

    git remote add pySan git@github.com:sanfx/myrepo.git
    

    如果您仍然遇到SSH错误,请检查您的公钥/私钥对,或使用https开始:

    git remote set-url pySan https://github.com/sanfx/myrepo.git