0

I am using Redhat linux in my web server and I had git repositories manually setup in one ip called 192.168.0.100. This was installed under a user called git. I have been accessing git by calling like:

git clone git@192.168.0.100:my-project.git

After that I planned to install gitlab in the same server. So I installed gitlab community version. But after that I can no longer access my old repositories. So I uninstalled gitlab using commands :

sudo gitlab-ctl uninstall
sudo dpkg -P gitlab-ce

After that I try to access my old repositories using command in my local machine :

git clone git@192.168.0.100:my-project.git

But it showing error like:

Cloning into 'my-project'...
sh: /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell: No such file or directory
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

Apparently my gitlab installion changed some settings in git.

Where I can fix this ?

prakash
  • 3
  • 1

1 Answers1

1

I don't know how you set up your server originally and the old git-user's home-directory but I assume that it was just /home/git (if not, change /home/git to whatever your original path was). You should just check that by looking into /home/git and see if your repositories are in there (or in a subfolder).

The gitlab installation probably changed the git-user's home-directory. If your repositories are under /home/git, you can try

git clone git@192.168.0.100:/home/git/my-project.git

If that works you can edit the /etc/passwd file (as root) and give the git user his old directory back:

git:x:998:998::/home/git:/bin/sh

or use usermod:

sudo usermod -d /home/git git

Again: In all of the above, change /home/git to the path of your repositories (the parent folder of the .git folders).

Broco
  • 1,999
  • 13
  • 21