TurnKey Linux Virtual Appliance Library

GitLab Troubles (SOLVED!)

Hi, I'm new here to the forums and to TurnKey Linux. From what I've been reading, this is a great community! And TurnKey Linux is awesome! But anyway...

I'm running an OpenVZ container with GitLab on Proxmox version 2.2. I downloaded the template from Proxmox, and I've downloaded it from here as an OpenVZ container. I've followed the steps to enable the OpenVZ console, so that's not a problem. I can get to the GitLab login page, and login with username/email - 'admin@example.com' and password - 'turnkey'. I tried creating a new project, but I'm asked by GitLab to create an SSH key (which the appliance does for us.) So I went to 'My profile', then 'Add public key.' I pasted in the key I found in '/home/git/gitlab.pub' and removed the line breaks. The key is added successfully (or so it says). I am then instructed by GitLab to 'push the repository.' So I go to the IP that GitLab is given followed by ':12320' for the web shell. At this point, (GitLab has already created the repo) I cd into '/home/git/repositories/example.git'. I try a 'git status', gives some error, so I type 'git init' to initialize an 'empty branch'. I then type, 'git remote add origin git@git.example.com:example.git'. That goes okay. I type 'git push -u origin master' and it prompts for a password. I've put in every password I know of and it does not work. I typed 'ssh -vvv git@git.example.com' and it gives me some output that looks like it's looking for the key in '/root/.ssh/ida_rsa' and doesn't find it there. Any ideas?


In advance, I apologize for this obscenely large post. :)

Jeremy's picture

Have you run the init/firstboot scripts?

All OVZ containers need to be initialised prior to first use:


Hopefully that will solve your issues!?

I have been using the GitLab appliance and don't recall having to go though the steps you are talking about (although I did have to add my key to be able to push to the server from my laptop). I have used it only externally though - as in how you would use GitHub - not from within the GitLab appliance (as it sound like you are).

Doing 'turnkey-init' seems to

Doing 'turnkey-init' seems to have broken it. The GitLab service doesn't exist anymore and now nginx gives a '502 Bad Gateway' message. I should have mentioned that I tried another way as well. I used tkliso2ovz to convert the GitLab ISO into an OpenVZ Container and that seems to run 'turnkey-init' on first boot. All of the ways I've tried, I get the original result. Adding the SSH key and then I am unable to push a repo because it doesn't like any password I give it. I should also add at this point that if I try 'ssh-add' it says 'Could not open a connection to your authentication agent.' And when I try 'pgrep ssh' nothing appears so I'm assuming there isn't an SSH process running. Also, I add the SSH key through the GitLab web interface and it takes it just fine. I just can't push a repo which then complains the password isn't right. Doing 'ssh -vvv git@git.example.com:example.git' complains that it can't connect either.

Jeremy's picture

As strange as it may sound...

I think that is a good sign. Let me guess, you are running it with less than 1GB RAM? The fact that you get a 502 and the service isn't running is because it stalls due to not enough RAM. Or at least that's what I've experienced.

I am running the TKL OVZ build direct from within the PVE UI (which is the build that is hosted on SourceForge). When I was mucking around trying to update it I launched about 6 instances of it and it just worked OOTB (when given 1GB RAM and after running 'turnkey-init'). Although in fairness I never tested pushing to any of the 6 test instances I created (just the first that I used). I do recall having to manually start shh via the host console on very first boot.

When I get a chance tonight I'll try a fresh instance ang see how it goes...

It's more of a "me" thing...

Well, I was unaware that there were 2 'create project' buttons. The one that works for me is in the 'admin' section. I didn't realize I had to add a key if you use the other one. As far as the SSH thing, that would be ignorance on my part. I generated the key IN the appliance and tried to use it IN the appliance. So that would explain why it wouldn't work correctly. I'm pretty new to version control and SSH. Anyway, Thanks Jeremy for all your help. I really appreciate it.

Jeremy's picture

No worries!

Glad to hear that you got it sorted and that you are all go! :)

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)