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.

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.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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
share|improve this answer
    
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 at 13:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.