Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


I have a Linode VPS (Ubuntu 12.04 server), and I want to use Git to manage my files from the VPS to my local Windows desktop.

I have installed Git Bash and have been using that on the Windows/local end of things.

I continue to get the error:

 Fatal: Could not read from remote repository
 Please make sure you have the correct access rights
 and the repository exists.

when I attempt to push a remote repo I've added.

Can someone double check my process, and tell me exactly what is needed for proper access rights?

Repository setup

First, I created a git user, and put them in a group called gitgroup. I've put in SSH keys and can login without a password to

I would like to keep my repo in /srv/git/, so I created a directory /srv/git/myrepo.

Inside the directory, I ran the command git init --bare.

On my local computer, I created a directory called git-local, and ran git init in it. It says it is the master repo.

So now I pull up Git Bash in my git-local directory. I attempt to add a remote repo:

$ git remote add myrepo

This works without error.

I created earlier an HTML file and added it to my master local repo.

I tell Git to push the changes:

$ git push myrepo master

This returns the error I've outlined above.


The user git is the owner and creator of /srv/var/git/myrepo. The group gitgroup is the owner of /srv/var/git (was created by root).

What am I missing?

share|improve this question

migrated from Mar 13 '13 at 6:48

This question came from our site for professional and enthusiast programmers.

yep sorry about that. I'm obviously using my actual server host name, and my actual domain name. – user2161916 Mar 12 '13 at 21:27
What are the exact permissions on that directory? Do all parents have the relevant x (execute) bit set for the user git or the group gitgroup, whichever applies? (You may want to post the permissions of these directories here — i.e., run ls -ld /srv /srv/var /srv/var/git /srv/var/git/myrepo and post the output — so we can validate them.) Last, does git push --verbose yield more info? – Thanatos Mar 13 '13 at 7:31

This solution helped me:

cd ~/.ssh
chmod 600 *
share|improve this answer

You must log in to answer this question.