question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GitHub Desktop authentication breaks when a cloned GitHub repo has it's remotes changed.

See original GitHub issue

Description

Authentication fails when a repository that was previously cloned from GitHub, has its remotes changed to point to a location other than GitHub. When attempting to push or fetch I receive an Authentication failed message box. If you remove the repo, and add it with Add Local Repository... GitHub Desktop will ask for credentials. Is there some way that GitHub desktop could detect this situation, and remedy it?

Version

  • GitHub Desktop: Version 1.5.0
  • Operating system: macOS 10.14

Steps to Reproduce

  1. Click Fetch origin or click Push

Expected Behavior

Fetch or push complete as expected

Actual Behavior

Receive Authentication failed message box

Additional Information

It appears that the logic associated with this issue is located in gitAuthenticationErrorHandler. The error handler would return the error without spawning the promptForGenericGitAuthentication dialog because GitHub Desktop still thinks the repo is a GitHub repo.

Logs

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
SteelPhasecommented, Dec 14, 2018

The new remote is just a vanity proxy in front of our new GitHub Enterprise service. We switched between two GitHub Enterprise instances at my company. Since a significant quantity of our projects were written in golang, we were required to change all our import paths during the conversion. We decided to go with the vanity proxy to prevent another rewrite if the company ever decided to change the GitHub enterprise domain in the future.

Outside of this oddity, it really hasn’t been an issue. This was definitely an unexpected consequence of the change.

0reactions
outofambitcommented, Dec 14, 2018

Awesome! We store the URL of the github repository at https://github.com/desktop/desktop/blob/8fe1c9b43a0c0a24c74675b71ba5bde178e3d77f/app/src/models/github-repository.ts#L16

so I think we can validate if the repository URL has changed by checking the remote against that.

Thanks again for filing this! It will be a nice improvement.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git Push ERROR: Repository not found - Stack Overflow
I had been added to an existing project. I cloned it and committed a local change. I went to push and got the...
Read more >
Fix Git's 'fatal: repository not found' error quickly | TheServerSide
If the repository was deleted or renamed, you'll obviously hit a Git repository not found error when you attempt to clone or fetch...
Read more >
Managing Projects with GIT - UiPath Documentation Portal
In the Manage Remotes dialog, right-click a remote repository and select Change Credentials. Depending on how the repository was cloned (via HTTPS or...
Read more >
Improving Git protocol security on GitHub
We're changing which keys are supported in SSH and removing unencrypted Git protocol. Only users connecting via SSH or git:// will be affected....
Read more >
Git Clone Branch – How to Clone a Specific Branch
Git is a distributed version control system designed to track changes to a project (code) in software development. It is intended to enforce ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found