Yahya Essam
Yahya Essam

Reputation: 1912

Git fatal not valid : is this a git repository?

I got this error when I'm trying to push my commit

fatal: http://username@servernet:8000/scm/~user/filename.git/info/refs not valid: is this a git repository?

I don't know why the link changed and those /info/refs dirs added. and how to remove them?

Upvotes: 2

Views: 9140

Answers (4)

Adeniyi Segun
Adeniyi Segun

Reputation: 31

check if your proxy is on from your PC settings, if on toggle/switch it off

then reconnect to your network

in your terminal after setting it to the right repositories, if still not working try git fetch --all

enter git push again it should work

Upvotes: 1

Yahya Essam
Yahya Essam

Reputation: 1912

this solved my problem :

git remote set-url origin [REPO-URL]

Upvotes: 4

Arpit Solanki
Arpit Solanki

Reputation: 9931

add remote url again with:

$ git remote add some_othername url_here

or You can remove the remote origin by

$ git remote remove origin

then add the remote origin again.

Upvotes: 0

Praveen Raj Kumar
Praveen Raj Kumar

Reputation: 208

Add origin master and try pushing the changes again

Upvotes: 0

Related Questions