Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'd like to be able to clone, push and pull (via SSH) on my Gitlab-Server from/to itself.

Currently, when try to clone a git repository locally from my server I get this:

jacob@server: git clone git@git.example.com:project.git
fatal: 'project.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

When I try to connect via ssh, I get a normal shell:

jacob@server: ssh git@git.example.com:
git@server:~$ 

Replacing git.example.com with localhost, 127.0.0.1 or the local IP yields the same results.

Cloning/... from another PC works flawlessly. When I connect via SSH from an other PC, it shows:

jacob@mypc: ssh git@git.example.com:
PTY allocation request failed on channel 0
Welcome to GitLab, jacob!
Connection to git.example.com closed.
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

It looks as though the problem evident in your SSH shell-getting test is unrelated (the server likely just ran out of PTYs). You shouldn't need a terminal to be allocated to use git.

It's necessary that project.git be a git repository located in the home directory of the user git. Also check that there isn't a folder project.git in your current working directory.

share|improve this answer
    
Thanks, that pointed me to the error. I just had to change the source to git@git.example.com:repositories/project.git since the projects are saved in /home/git/repositories. –  jacob11235 Jul 13 '13 at 17:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.