Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't push to new gitlab install

Good afternoon all,

Backed up several old git repos and am in the process of adding them to a knew gitlab install. Install looks like the guide here https://github.com/gitlabhq/gitlabhq/wiki/VirtualBox-Image

When adding a new origin remote like this;

git remote add origin [email protected]:project.git

and attempting a push I get the following

fatal: 'project.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

Gitlab install is behaving as expecting and accessible via HTTP and SSH from the LAN.

The gitlab status task returns fine too

bundle exec rake gitlab:app:status RAILS_ENV=production

Anyone have any idea where I should be looking now? Stumped.

edit.

SSH keys are present

I've attempted adding the git repo with the ssh://[email protected]/usr/local/project.git style too

like image 903
Kelvin Avatar asked Nov 12 '22 19:11

Kelvin


1 Answers

This question a bit old, so I'm not sure if this is still helpful, but I was having the same problem and finally fixed it.

I found the solution in one of the comments in this bug report.

In /etc/nginx/sites-available/gitlab, there's a line that, if you follow the helpful comments, will have your IP. Change it to listen to *:80 instead. It should look like this:

listen *:80 default_server;         # e.g., listen 192.168.1.1:80;

Then, restart Gitlab and Nginx:

sudo service gitlab restart
sudo service nginx restart

That resolved the problem for me.

To confirm that this was the problem, I removed the * and put in the IP, restarted and it broke again. Put it back, and it worked.

I'm not completely sure why this fixes it, but I hope this helps somebody out there; this was a very frustrating problem to deal with.

like image 52
Jonathan Wren Avatar answered Dec 29 '22 01:12

Jonathan Wren