When I try to do a fetch with Sourcetree, I get the following error:
git --no-optional-locks -c color.branch=false -c color.diff=false -c color.status=false -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree fetch origin
remote: Repository not found.
fatal: repository 'https://github.com/theCompany/theRepository/' not found
Completed with errors, see above
If I run this command on the command line (less the -c credential.helper=sourcetree part which my command-line git doesn't like), the fetch works fine:
git --no-optional-locks -c color.branch=false -c color.diff=false -c color.status=false -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
How do I debug and fix this?
that sounds like an annoying problem!
Maybe the credentials that SourceTree uses are invalid? You could try to reset them or switch to the system git client.
This post has some informartion about that: https://community.atlassian.com/t5/Sourcetree-questions/Sourcetree-has-invalid-credentials-but-cannot-clear-reset-them/qaq-p/753478
I hope that helps!
I was seeing this problem - in my case it was because my account hadn't given permission for SourceTree to see the organization the repository was part of.
To fix this, on GitHub, go to your settings page, then Applications -> Authorized OAuth Apps. Click SourceTree for Windows (in my case), scroll down and allow access for the Organizations you need