【问题标题】:Permission denied (publickey) on github when fetching from upstream从上游获取时,github上的权限被拒绝(公钥)
【发布时间】:2012-11-15 06:48:42
【问题描述】:

我似乎无法通过 ssh 密钥身份验证从上游获取更改。

我可以添加 repo 就好了:

$ git remote add upstream git@github.com:user/repo.git

我的 ssh 文件夹的内容似乎没问题:

$ ls ~/.ssh
authorized_keys  id_rsa  id_rsa.pub  known_hosts

登录完美:

$ ssh -T git@github.com
Hi user/repo! You've successfully authenticated, but GitHub does not provide shell access.

但是从上游获取不起作用:

$ git fetch upstream
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

有什么想法吗?

【问题讨论】:

    标签: github ssh-keys


    【解决方案1】:

    如果你不“拥有”遥控器,你应该只使用只读链接

    git remote add upstream git://github.com/antirez/redis
    

    【讨论】:

    • 非常使用完整的描述和命令。它节省了我很多时间。非常感谢您的翔实回答。
    猜你喜欢
    • 2012-01-18
    • 2012-04-25
    • 1970-01-01
    • 1970-01-01
    • 2012-05-22
    • 2021-11-11
    • 2018-11-06
    • 2011-11-25
    相关资源
    最近更新 更多