UtkarshaG
UtkarshaG

Reputation: 389

Getting fatal error: .git/info/refs not valid: is this a git repository?

I have a git repo hosted at AWS whom im trying to preform:

git push -u origin master

I am getting the following error:

fatal: http://[URL]/[Repo-Name].git/info/refs not valid: is this a git repository?

Ive tried the answer here without any success: Git .git/info/refs not valid: is this a git repository?

fatal: .git/info/refs not valid: is this a git repository?

What will be the possible solutions over this error?

When I am using

git remote -v

I am getting:

origin  http://[URL]/test1.git (fetch)
origin  http://[URL]/test1.git (push)

Upvotes: 3

Views: 3918

Answers (3)

Azhar
Azhar

Reputation: 51

Please check if your remote git repository is local or remote and if you are going through a Proxy or not.

For local repo you should bypass the proxy. For example, to bypass proxy for your repo at "origin" you can use this:

git config --add remote.origin proxy "" 

This will bypass proxy, if you are inside a corporate firewall and you should not get this error.

Upvotes: 0

Richard
Richard

Reputation: 8758

Another reason that causes this error could be missing access rights for the user which tries to connect to the repository. In gitlab, make sure that the user is a member of the repository and is registered as Developer.

Upvotes: 0

cst1992
cst1992

Reputation: 3931

The answers you linked refer to a change in the URL. Generally it happens on locally hosted servers such as GitLab that the ports displayed differ. You might want to check what your port is, it may not be the default port(80).

Upvotes: 1

Related Questions