【发布时间】:2013-07-17 17:47:31
【问题描述】:
我已经安装了GitLab。假设我安装在/home/myuser/gitlab。
- 我创建了一个新项目
- 有人告诉我要创建一个我在
/home/myuser/gitlab/test中输入的 repo “测试” - 我在
/home/myuser/.ssh中添加了一些 SSH 密钥 - 然后我在
/home/myuser/gitlab/test中初始化了一个 Git 存储库。 - 按照说明,我添加了一个遥控器
git@localhost:root/testing.git但是当我尝试推送时,我收到以下错误消息:
$ git push -u origin master
ssh: connect to host localhost port 22: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我在 OS X 中安装了 GitLab,我在 /home/myhome/.ssh 中有其他 SSH 密钥,我在 /home/myuser/gitlab/.git/config 中设置了用户电子邮件和名称,(并在全局范围内设置它们只是为了测试)并且服务器从 @ 启动987654330@。有人知道这个错误来自哪里吗?
如果我运行ssh git@localhost,我会得到
/home/myhome/.ssh/config line 4: garbage at end of line; "home".
在这个文件中,我为另一个项目的远程服务器设置了一些设置。我认为这是问题所在,但我真的不知道如何解决它。
更新:这是我的~/.git/config 文件的内容
Host remote_test_server
Hostname remote_test_user@ftp.remote_test_server
IdentityFile ~/.ssh/id_rsa_stf.pub
User <your home acct>
【问题讨论】:
-
@AloisMahdal 是的,我认为这是烫发问题。我要更新我的标题
标签: ruby-on-rails ruby git gitlab