Link to home
Start Free TrialLog in
Avatar of Bernard Savonet
Bernard SavonetFlag for France

asked on

Problem with Gitlab

I am getting mad trying to use a GitLab server I have installed in a OpenVZ container as available from http://www.turnkeylinux.org/gitlab...

Everything seems to go fine on the server... but from my local client I cannot either pull or push to the repositories: I am asked for 'git' password... but giving its Unix password does not work.

In fact, when on the server I cd to the directory under /home/git/repositories/ which I presume to be a git repository, 'git status' just answers 'fatal: This operation must be run in a work tree'

Obviously I am doing something wrong... if only I knew what!

Not sure if I have a Linux user problem? rights problem? git problem?
ASKER CERTIFIED SOLUTION
Avatar of gr8gonzo
gr8gonzo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bernard Savonet

ASKER

B-) Thx for your prompt answer!

I could not clone my existing local repositories, since they are on my local windows machine and not accessable thru the net.
To make things easier, I created a "project" under Gitlab, which I (wrongly) assumed to create everything needed by Git
I have then realized that Gitlab gives instructions to locally create the repository... but they seem uncorrect:
Git global setup:
git config --global user.name "Administrator / Bernard"
git config --global user.email "admin@my_domain.fr"

Open in new window

Create Repository
mkdir testing
cd testing
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@mygit.my_domain.fr:admin/testing.git
git push -u origin master

Open in new window

Everything seems OK, except that on this last command git asks for "git@mygit.my_domain.fr's password:" (fine) to which I answer the (unix user) git password, but I then get
fatal: 'admin/testing.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

Open in new window

while git log confirms everything to be ok:
commit 7872953b5447a6f68f3dee5d1cc273ddda9b2944
Author: root <root@mygit.my_domain.fr>
Date:   Mon May 5 17:28:17 2014 +0200

    first commit

Open in new window

B-) I suspected that maybe the repository and the directory should have the same name instead of different names, but apparently this is not enough
problem solved.
will detail later
thx!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The initial problem was caused by the way the OpenVZ container is defined in Proxmox. The TurnKeyLinux template assumes incorrectly the container to use venet, while I am using veth.