Amir Sachs's picture

Hi,

I am new to git so please excuse if I'm using any wrong terminology here.

I downloaded the appliance (https://www.turnkeylinux.org/gitlab) and deployed it on esxi. everything installed correctly and i can access the git server from other computers.

I have a development server (on the same vm host as the git appliance) and I am trying to push the files from the development server to the git server, so the master is the development server.

I setup a group and then setup a project.

On the dev server (ubuntu 14.04) after i installed git, i run the following command in the directory i want to push:

cd signup <- that's the folder name
git init
git remote add origin http://abc.mydomain.com/groupname/signup.git
git add .
git commit -m "initial push"

so far everything works without a problem.

When i enter the following command:
git push -u origin master
I am asked for 
Username for 'http://abc.mydomain.com' 
and i enter gitlab-admin (which is the administrator username)

I am then asked for a password and after i enter the password i get the following error:
error: Cannot access URL http://abc.mydomain.com/groupname/signup.git/, return code 22
fatal: git-http-push failed

if I enter different credentials I get the following expected error:
fatal: Authentication failed for 'http://abc.mydomain.com/groupname/signup.git/'

I have searched the internet far and wide for the last 2 days and I can't get a solution to this.
How can I resolve this?

Thanks in advance,

Amir

Forum: 
Tags: 
Jeremy Davis's picture

Hi. Sorry to hear of your troubles and apologies on being so slow to respond.

Unfortunately it appears that git push via http is broken in the current appliance. :(

We will be releasing a fixed version at some point in the (hopefully very near) future, although I don't want to raise expectations too high as there is no ETA. In the meantime you should be able to work around that by pushing via SSH. E.g.:

git remote set-url origin git@abc.mydomain.com:/groupname/signup.git
git push -u origin master
You'll need to use the Linux git user password which IIRC you set at first boot?! If I'm mistaken, then you could create a new Linux user who is a member of the 'git' group (on your GitLab server). IMO the ideal setup is to use SSH keys (to avoid having to provide a password everytime) although if you are using a Windows host, that involves a bit of mucking around. If you are using Linux or Mac then it should be really easy.
Amir Sachs's picture

Thanks Jeremy. Appreciate the response.

The git user password isn't the root password. I had to set it up using passwd.
When I try to follow the SSH route after the "git push..." I get

fatal: 'groupname/signup.git' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Am I still doing something wrong?

 

Jeremy Davis's picture

Apologies on slow response. I've been flat out and had a week off as well...

TBH when I tested and gave you the instructions previously as per always I was quite pressed for time. As I didn't have a GitLab appliance running already, I made do with a LAMP appliance that I had running already. Whilst it worked fine for me, I hadn't considered all the factors directly relevant to the GitLab appliance. Apologies on that.

I really need to spend some time to sit down and look into it more closely. Unfortunately I'll have to come back to this as I'm trying to catch up on my backlog. I'm really sorry for your sub-par experience and my incomplete info.

Del's picture

I don’t know if you resolved your issue, but I was having a very similar problem. Following Jeremy’s last response (pushing via SSH) I would get the “fatal: Could not read from remote repository” after several attempts of entering git@<your domain>’s password. I finally figured out how to connect.

1. Generate your SSH key pair
2. Place your SSH public key in GitLab (this will allow you to use the SSH connection information in GitLab)
3. Send your SSH public key to your GitLab server: ssh-copy-id root@<your gitlab server>
Here you will be prompted for root’s password to connect to your GitLab server.
You should see a response that says: 
    Number of key(s) added:   1

    Now try logging into the machine, with:   "ssh 'root@<your gitlab server>'"
    and check to make sure that only the key(s) you wanted were added.
4. Test your connection to your GitLab server using your SSH key: ssh root@<your gitlab server>
You should be prompted for your SSH private key passphrase you used to generate you SSH key pair.
If successful, you will be logged into your GitLab server using your SSH key. If not, something is wrong.
To logoff your GitLab server type: exit
5. Push your changes using SSH:
    git remote add origin <ssh link from gitlab>
    git push origin master

I hope that helps.

Jeremy Davis's picture

I've been flat out and never got back to this unfortunately... We hope to release an update GitLab server with some tweaks soonish, although I don't have an ETA just yet...

Add new comment