I searched for a while but I can't find a solution to my Problem.
I have a Server I can connect to via ssh with the username git
and a local git repository.
Now I want to push my local repository to a newly created one on the Server.
Here is what I did:
- created a git repository in
/home/git/test.git
- initialized the repository as bare
- added the remote repository on the local machine
git remote add test ssh://git@serverIp:/home/git/test.git
- now I executed the push command:
git push test master
I always get the
fatal: could not read from remote repository
Please make sure you have the correct access rights
and the repository exists.
I am working on a local windows 7 machine and want to upload to a linux server.
I can log in via ssh with the git
user.
I also tried to do this as the root
user(to get things to work once) with the same result.
I never get asked for the ssh password
.
I really don't know what I am doing wrong.
Before you call this a duplicate, I searched a lot for this problem and none seemed to talk about the same problem.
update:
- "which git" returns /usr/bin/git
- PATH echo includes /usr/bin
- id_rsa and id_rsa.pub files are all set up and withput Passphrase
- ssh git@serverIp which git-receive-pack works too and returns /usr/bin/git-receive-pack
- ssh git@serverIp ls /home/git/test.git works
- all relevant directories are chmod 755
- git is owner of the repository
- auth.log file gets no new entries on tried push command
- GIT_TRACE=2 git push test master returns:
'C:\Program Files (x86)\PuTTY\plink.exe' '-batch' 'git@serverIp' 'git-receive-pack '\''/home/git/test.git'\''' fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.