Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am attempting to pull my code from a remote repo. When I run 'git pull' I get the following message:

$ git pull
root@gohyperspace.com's password:
fatal: 'var/www/html' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Here's my config settings:

$ git config -l
core.symlinks=false
core.autocrlf=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
pack.packsizelimit=2g
help.format=html
http.sslcainfo=/bin/curl-ca-bundle.crt
sendemail.smtpserver=/bin/msmtp.exe
diff.astextplain.textconv=astextplain
rebase.autosquash=true
merge.tool=tortoisemerge
gui.recentrepo=C:/Users/Chris/Dev/Projects/html
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.hidedotfiles=dotGitOnly
remote.origin.url=root@gohyperspace.com:var/www/html
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
user.name=Chris Barnhill
user.email=*@gmail.com
gui.wmstate=normal
gui.geometry=887x427+26+26 171 192

By the way, 'gui.recentrepo' is wrong. My local repo is located in /Users/Chris/Dev/Projects/Hyperspace/html'

share|improve this question
    
try cloning the repo in a new directory. if it doesn't work, something is foobar with the repo. –  northben Jun 19 '13 at 2:53

2 Answers 2

Are you positive of the remote repo location? Should it be /var/www/html?

It appears that you're accessing the relative path.

share|improve this answer

I'm answering based on your updated question. You are trying to push to a non-bare repository, which means a repository that actually contains artifacts. A bare repository is one that "doesn't contain a working directory". In the remote repo, you are trying to push to, the master branch is checked out and so Git rejects the attempt.

To explain a bit further, imagine Alice, and Bob are working on the same project. Bob clones Alice's working repository, then they both went separate ways, but work on the same branch, say master. If Bob tries to push his changes to origin/master, which is Alice's working repository, and Git allows it, Alice would suddenly be working with a new state of the code base she isn't aware of (and might not want). This is just one sample scenario.

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.