【发布时间】:2013-07-18 19:18:43
【问题描述】:
我打开了一些我之前问过的问题,但现在问题似乎与ssh 非常相关。
- 我已经在
/home/myuser/gitlab中安装了Gitlab。 - 我创建了一个代表
test - 按照说明,我添加了一个远程
git@localhost:root/testing.git(Gitlab的服务器在端口 3000 上运行)
现在,当我尝试推送时,我收到以下错误消息:
$ git push -u origin master
ssh: Could not resolve hostname mylocalhost: nodename nor servname provided, or not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
现在,我发现我的 ssh 连接有问题。这是我的/home/myhome/.ssh/config 文件
Host mylocalhost
Hostname localhost
PORT 3000
User git
IdentityFile /home/myuser/.ssh/id_rsa.pub
当我运行ssh mylocalhost 时,我收到了这条消息
ssh_exchange_identification: Connection closed by remote host
在详细模式下,似乎在正确的端口上建立了连接,但进程在此处失败debug1: ssh_exchange_identification: HTTP/1.1 400 Bad Request。
我尝试更新我的/System/Library/LaunchDaemons/ssh.plist(我正在使用OSX)以转发端口监听3000,但随后GitlabWebrickRails 服务器将不再运行。 l 试图改变git remote set-url origin mylocalhost:testing.git
【问题讨论】:
标签: ruby-on-rails ruby git gitlab