inyfee
V2EX  ›  问与答

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

  •  
  •   inyfee · Nov 27, 2013 · 4526 views
    This topic created in 4733 days ago, the information mentioned may be changed or developed.
    我在 /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 replies  •  1970-01-01 08:00:00 +08:00
    zz1956
    zz1956
    Nov 27, 2013
    1
    chown -R yourname:yourname /var/www
    ceyes
    ceyes
    Nov 27, 2013❤️1
    2
    都说了是“Permission denied (publickey).”
    你的用户的 publickey 是添加过去了,但是 root 的应该没有吧
    你的sudo ……
    inyfee
    inyfee
    OP
    Nov 27, 2013
    3
    @ceyes 对 git 不太熟,原来是这样的原因 ,谢谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1402 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 17:06 · PVG 01:06 · LAX 09:06 · JFK 12:06
    ♥ Do have faith in what you're doing.