Cakephp - 与“thechaw”战斗;在 git 上
我觉得我尝试了一切从 git 克隆 http://thechaw.com/source 但没有成功。我有一个创建 SSH 密钥来访问这个 git,我相信我遵循了指示,但我错过了一些简单的东西。
我遵循了所有说明(http://thechaw.com/wiki/guides/setup) 。有人可以告诉我我出了什么问题吗?
第一:
<代码>% cd ~/.ssh && sh-keygen
- 将我的密钥添加到他们的“帐户”部分(我假设该密钥遗漏了“ssh-ras”和“me@mydomain”`
然后:
% git config --global user.name "<我的 git 用户名>"
% git config --global user.email <我的 git 电子邮件地址>
现在我尝试使用克隆
% sudo git clone [电子邮件受保护]:chaw .git
我总是收到:
Initialized empty Git repository in /var/www/chaw/chaw/.git/
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
我已经尝试了很多小时。我缺少什么?我有一个 github 帐户,我什至将我的 ssh 密钥放在那里(但我相信这不会有任何影响)。
任何帮助将不胜感激。谢谢!
I feel like I tried everything to clone http://thechaw.com/source from git with no success. I have a create SSH keys in order to access this git and I believe I followed the directions but I'm missing something easy.
I followed all the instructions (http://thechaw.com/wiki/guides/setup). Can someone tell me what I'm going wrong?
First:
% cd ~/.ssh && sh-keygen
- Added my key to their "account" section (I assume the key leaves off the "ssh-ras" and the "me@mydomain"`
Then:
% git config --global user.name "<My git Username>"
% git config --global user.email <My git Email address>
Now I try to clone using
% sudo git clone [email protected]:chaw.git
I always receive:
Initialized empty Git repository in /var/www/chaw/chaw/.git/
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
I've been trying for many hours. What am I missing? I have a github account and I even put my ssh key in there (but I believe that shouldn't have any effect).
Any help would be appreciated. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信您将 ssh 密钥和 Git 配置添加到非 root 用户,但随后使用“sudo”进行克隆,从而使 Git 找不到您的用户密钥(因为它以 root 身份运行)。
I believe you added the ssh key and Git configuration to your non-root user, but then used "sudo" to do the clone thereby making Git not find your user's keys (since it's running as root).
花了相当长的时间,这就是我最终做到的。我无法让它在 rsa 上运行,所以我尝试了 dsa,然后它就工作了:
然后进入我在 thechaw 的帐户并将其粘贴到 git 密钥字段中。
然后我
就检查出来了。这真是一种解脱。 :)
spent quite some time and this is how i finally did it. i couldnt get it running on rsa so i tried dsa and then it just worked:
then just went into my account at thechaw and pasted it into the git key field.
then i
n it checked out. wat a relief. :)