I have installed GitLab. Suppose I installed it in /home/myuser/gitlab
.
- I created a new project
- I was told to create a repo "test" I put in
/home/myuser/gitlab/test
- I added some SSH key in
/home/myuser/.ssh
- Then I initialized a Git repo in
/home/myuser/gitlab/test
. - Following instructions, I added a remote
git@localhost:root/testing.git
but when I try to push, I get this error message:
$ 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.
I installed GitLab in OS X and I have other SSH keys in /home/myhome/.ssh
, I have set up the user email and name inside /home/myuser/gitlab/.git/config
, (and set those globally just for testing) and the server is launched from /home/myuser/gitlab
. Does anybody have an idea where this error comes from?
If I run ssh git@localhost
, I get
/home/myhome/.ssh/config line 4: garbage at end of line; "home".
where in this file I have some settings for a remote server for another project. I think it is the problem but I don't really know how to fix it.
Update : Here's the content of my ~/.git/config
file
Host remote_test_server
Hostname remote_test_user@ftp.remote_test_server
IdentityFile ~/.ssh/id_rsa_stf.pub
User <your home acct>