0

I recently updated to git v 2.14 using the Windows Installer. After that, I carried on working with my organisation's private repository as usual, adding the files as required, committing, etc. At the end of the day, when I went to push (from PowerShell), I received the following error:

> git push
remote: Repository not found.
fatal: repository 'https://github.com/<User>/<Repo>.git/' not found

Navigating to the mentioned URL showed my repository with all the commits that were previously there. The ones that I had done since the update had not been committed.

I then went to check on the Windows Command Prompt, receiving the same error message. Same thing happened on Git Bash.

Commands that act on the local repository (git commit, git add, git reset, etc.), were working fine. Other commands that require communication with the remote yield the same results. Stuff like git fetch or git clone show the error:

> git clone 'https://github.com/<User>/<Repo>.git'
Cloning into '<Repo>'...
remote: Repository not found.
fatal: repository 'https://github.com/<User>/<Repo>.git/' not found

I'm quite sure it's a problem in how my account is communicating with private repositories from the organisation, but I can't find a way to solve it.

Has anyone encountered this issue before? Any ideas?

4
  • A proxy issue mayhaps? Commented Sep 4, 2017 at 11:22
  • At first check out the result of ping >ping www.github.com Commented Sep 4, 2017 at 12:25
  • @AnsgarWiechers Not proxies being used. Commented Sep 4, 2017 at 12:28
  • @Ali.Asadi The address is pinged correctly. Commented Sep 4, 2017 at 12:29

2 Answers 2

1

After a while or trying different stuff, I opened the repository from Git GUI. When I tried to push, it requested my email and password (something that PowerShell would always ask for). Adding all the information, it pushed fine.

I tried again from PowerShell and received no prompt for credentials. Checking git config --global -list (as suggested by @AdilHindistan) listed credential.helper=wincred. Apparently, during the update I had left ticked the option to enable the Git Credential Manager for Windows. It had probably saved my password from a previous repo or with a typo, so the credentials were wrong.

1 Since the credential.helper key is a multi-valued config list, there's no way to "unset" a helper once it's been set. So if your system /etc/gitconfig sets one, you can never avoid running it, but only add your own helpers on top.

The following line worked for me:

git config --global credential.helper 0
Sign up to request clarification or add additional context in comments.

2 Comments

I use wincred and it becomes a problem if I do not update it when I reset my pwd. So the command you mentioned is useful (+1 for that). It might have helped to mention that your were prompted for password, that would mean connectivity was not the problem. If providing incorrect pwd is indeed generating "Remote Repo not found", I think it is a bad/misleading error message on git's part.
Yeah, I didn't notice at first. I realised it was not asking for a password when Git GUI asked for it. But thank you for your help =]
0

If all problems are pointing you at a connectivity issue from command line, then you should probably check your git config to see if the proxy is set properly. Below are a couple of pointers for you.

Display your git settings PS>git config --global --list

Setup a HTTP connection to a proxy server Add the following setting to the http items of .gitconfig files.

[http] proxy = : You can also configure it using the following config command:

PS> git config --global http.proxy <address of the proxy server>:<port of the proxy server>

Establish a HTTP connection to a user authenticated proxy server Add the following setting to the http items of .gitconfig files:

[http]

proxy = http://<username>:<password>@<address of the proxy server>:<port of the proxy server>

You can also configure it using the following config command

PS> git config --global http.proxy http://<username>:<password>@<address of the proxy server>:<port of the proxy server>

1 Comment

No proxies being used, but I found the problem thanks to your --list command. I'm publishing an answer.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.