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

I installed Turnkey Linux http://www.turnkeylinux.org/revision-control to have a Git server. The installation went fine and I created a user to use with git. It comes with a preinstalled repo called "helloworld.git".

In order to test GIT, I did git clone git://192.168.56.101/git/helloworld.git and it cloned the repo just fine. I then went into the repo and made a change and did commited. Then I added the remote by doing git remote add hassm@192.168.56.101:helloworld.git

I then did a push and it asked for my password as expecting but then said helloworld.git does not appear to be a git repository

Am I not putting the right location for the remote repo? Also how do I go about creating my own repo on the server. I am fairly new at managing a GIT server. Thanks.

share|improve this question
    
What does git remote -v say? Did you give your remote a name (git remote add name URL)? –  Andrew May 12 '11 at 3:32
    
Yes I did. It connects to the server, asks for my password, it just says the repo does not exist. –  mikelbring May 12 '11 at 3:36

1 Answer 1

up vote 1 down vote accepted

There are two problems here:

1) When you clone a repo, the original repo is automatically setup as the origin/master of your new copy. You do not have to add it in as a remote. 'git push' with no arguments should go back to that repo.

2) You have a typo in your remote repo. You are pulling from git://192.168.56.101/git/helloworld.git but trying push back to git://192.168.56.101/helloworld.git Note the dropped "/git/" directory in the path. That's why git was complaining - it wasn't finding a valid git repository (because it couldn't find any repository). But, as I said, you don't need this step anyway.

share|improve this answer

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.