【发布时间】:2011-12-27 15:43:01
【问题描述】:
所以我在 Windows 上安装了 Git GUI,我想推送到 ubuntu 服务器上的 git 存储库。
这是我到目前为止所做的:
1) 安装 git
2) 使用以下命令初始化存储库:
mkdir -p /home/ubuntu/gitdir/myproject.git
cd /home/ubuntu/gitdir/myproject.git
git init --bare
现在我收到一条成功消息,说明一切正常:
Initialised empty Git repository in /home/ubuntu/gitdir/myproject.git/
当我尝试通过 Git GUI 推送到服务器时出现错误:
Url: ubuntu@i.p./home/ubuntu/gitdir/myproject.git
Error: 'link' does not appear to be a git repository. The remote end hung up unexpectedly.
我还看到了一些在 IP 地址后添加冒号的语法,我不确定我这样做是否正确,但它给出了一个替代错误:
Url: ubuntu@i.p.:/home/ubuntu/gitdir/myproject.git/
Error: No supported authentication methods available (error shown via PuTTy popup)
我已经尝试在网上搜索答案,但似乎找不到任何有效的方法,我只想设置它并使其正常工作,然后我终于可以开始从实践中学习 Git!
其他信息:
- 我的 ubuntu 服务器在亚马逊 EC2 上。我有一个通过 SSH 连接的私钥,我在网上找到了一些信息,说明在后台运行 pageant.exe 并添加了私钥;这一切都设置正确(据我所知)。
如果我遗漏了什么,请询问更多信息。
提前致谢,汤姆。
【问题讨论】: