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

2013-11-27 09:45:48 +08:00
 yeelone
我在 /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.

请问这是为什么 ?
3776 次点击
所在节点    问与答
3 条回复
zz1956
2013-11-27 09:59:14 +08:00
chown -R yourname:yourname /var/www
ceyes
2013-11-27 11:58:08 +08:00
都说了是“Permission denied (publickey).”
你的用户的 publickey 是添加过去了,但是 root 的应该没有吧
你的sudo ……
yeelone
2013-11-27 12:40:32 +08:00
@ceyes 对 git 不太熟,原来是这样的原因 ,谢谢

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/90784

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX