Hi i cloned a local repository on another server http://localipaddress/git/project . It created an empty repository. When i tried to pull from the repository, it gave me an error

Your configuration specifies to merge with the ref 'master' from the remote but no such ref was detected.

On push i get the following message

error:Cannot access url "http://localipaddress/git/project" , return code 22 . Fatal git-http-push failed

What could have been wrong.

1 Answer 1


The issue is resolved. In mycase , it just worked out using the following url while cloning

http://username:password@localipaddress/git/project ,
instead of http://localipaddress/git/project.

May be some issue with the way username/pwds are handled by the repsoitory.

also in the .git/config file, need to check whether the following details are present

[remote "origin"]
    url = http://username:password@localipaddress/git/project 
    fetch = +refs/heads/*:refs/remotes/origin/*

[branch "master"]
    remote = origin
    merge = refs/heads/master
  • In my case, supplying the username was enough, storing the password in not necessary. So the URL gets username@localipaddress/git/project and the password will then be demanded later on.
    – Joma
    May 6, 2014 at 13:54

You must log in to answer this question.