V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
yeelone
V2EX  ›  问与答

在 /var/www 目录下无法git clone ,提示 Permission denied (publickey).

  •  
  •   yeelone · 2013-11-27 09:45:48 +08:00 · 3741 次点击
    这是一个创建于 3809 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我在 /var/www 目录下:
    sudo git clone ........

    提示:
    在 /var/www 目录下无法git clone ,提示 :
    Permission denied (publickey).
    fatal: The remote end hung up unexpectedly


    而在 home 目录 下则可以
    remote: Counting objects: 1990, done.
    remote: Compressing objects: 100% (1652/1652), done.
    remote: Total 1990 (delta 639), reused 1261 (delta 133)
    Receiving objects: 100% (1990/1990), 11.69 MiB | 1.22 MiB/s, done.
    Resolving deltas: 100% (639/639), done.

    请问这是为什么 ?
    3 条回复    1970-01-01 08:00:00 +08:00
    zz1956
        1
    zz1956  
       2013-11-27 09:59:14 +08:00
    chown -R yourname:yourname /var/www
    ceyes
        2
    ceyes  
       2013-11-27 11:58:08 +08:00   ❤️ 1
    都说了是“Permission denied (publickey).”
    你的用户的 publickey 是添加过去了,但是 root 的应该没有吧
    你的sudo ……
    yeelone
        3
    yeelone  
    OP
       2013-11-27 12:40:32 +08:00
    @ceyes 对 git 不太熟,原来是这样的原因 ,谢谢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1818 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 00:45 · PVG 08:45 · LAX 17:45 · JFK 20:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.