I am opening some question I somewhat asked before but now the problem seems to be pretty linked to ssh
.
- I have installed Gitlab in
/home/myuser/gitlab
. - I created a rep
test
- Following instructions, I added a remote
git@localhost:root/testing.git
(Gitlab
's server runs on port 3000)
Now, when I try to push, I get this error message:
$ 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.
Now, I found that there was a problem with my ssh connect. Here's my /home/myhome/.ssh/config
file
Host mylocalhost
Hostname localhost
PORT 3000
User git
IdentityFile /home/myuser/.ssh/id_rsa.pub
When I run ssh mylocalhost
I get this message
ssh_exchange_identification: Connection closed by remote host
On verbose mode, it seems that the connection is established on the right port but the porcess fails here debug1: ssh_exchange_identification: HTTP/1.1 400 Bad Request
.
I tried to update my /System/Library/LaunchDaemons/ssh.plist
(I am using OSX
) to forward port listening to 3000
but then the Gitlab
Webrick
Rails
server won't run anymore. L tried to change git remote set-url origin mylocalhost:testing.git