Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth issues when interacting with repositories hosted on non-GitHub hosts #18612

Closed
hszequel opened this issue May 14, 2024 · 12 comments
Closed

Comments

@hszequel
Copy link

The problem

Credentials are not persistence. After Github Desktop is closed and the operating system restarted credentials are requested again for non-GitHub hosts.

Release version

3.3.17

Operating system

Windows 10 (x64)

Steps to reproduce the behavior

  1. Try to fetch origin from any azure dev ops repository.
  2. Credential (PAT) is requested.
  3. After the credentials are entered, fetching, and pushing work as expected.
  4. After Github Desktop is closed and operating system restarted, credentials are requested again.

Log files

No response

Screenshots

image

Additional context

No response

@sergiou87
Copy link
Member

Thank you for your report. Could you upload all your log files (after redacting whatever is necessary) so we have more context to diagnose the issue? Thank you! 🙏

Also, does your repository use LFS?

@sergiou87 sergiou87 added the more-info-needed The submitter needs to provide more information about the issue label May 14, 2024
@hszequel
Copy link
Author

Please see the attached log files. After credentials are entered, it works but they need to be reentered.

2024-05-14.desktop.production.log

The repository does not use LFS.

@github-actions github-actions bot removed the more-info-needed The submitter needs to provide more information about the issue label May 14, 2024
@aolszowka
Copy link

Dupe of #18586

@hszequel
Copy link
Author

hszequel commented May 14, 2024

#18586 reported a bug that did not allow authentication to non-GitHub hosts like azure devops. After we upgraded from 3.3.14 to 3..3.15, we experienced this issue. Version 3.3.16 fixed #18586 but now that we are using 3.3.17 the issue is that authentication works but it is not persistent. Credentials have to be entered again, particularly when Github Desktop is closed and the operating system is restarted. This also happens when the user switches to a different repository.

@aolszowka
Copy link

aolszowka commented May 14, 2024

Credentials have to be entered again, particularly when Github Desktop is closed and the operating system is restarted. This also happens when the user switches to a different repository.

@hszequel Did you read the comments in there? ( #18586 (comment), #18586 (comment) but most specifically #18586 (comment)) Does that last comment mimic what you're seeing? I can say that it appears to be working, even after relaunching GitHub Desktop and switching repositories.

@hszequel
Copy link
Author

Thank you for mentioning these comments. I just read them. Repositories are accessible. We can reproduce the issue with another user (different desktops). Interestingly, a third user accessing the same repos with Github Desktop 3.3.17 has not had the issue. The only difference that we can think of is that this user upgraded directly from 3.3.14 to 3.3.17 while the other two went from 3.3.14 to 3.3.15 (authentication broke). Then, 3.3.17.

Workarounds:

  1. We downgraded to 3.3.14. The issue is resolved. The problem is that GitHub Desktop does not allow you to opt out from upgrading at the next restart :(
  2. Entering the PAT every time that it is requested (big usability issue).
  3. After reading the comments by @aolszowka, I generated a new PAT. So far so good, but we have only used the app for 30 minutes after that. I will update the ticket tomorrow

Based on the above, this should probably be classified as a bug.

@aolszowka
Copy link

@hszequel

Something to note is to watch the Credential Manager:

image

The behavior I was seeing (prior to removing all OLD credentials and removing any Repositories that were no longer accessible) is that after the initial prompt the credential would be created under the area boxed in red above and then after some set time the credential would disappear.

I am not familiar enough with their code base to know what code path's have the ability to delete/remove credentials from here, but that is where I'd start looking for the bug.

@aolszowka
Copy link

Sorry to double post here; but if you look at the log you provided @hszequel you see it helpfully delete the cred right here:

2024-05-14T12:17:58.593Z - info: [ui] askPassHandler: auth failed, deleting dev.azure.com credential

Based on the log you've got 16 repositories; did you go clear out ALL of the old creds? And ALL of those repositories are still valid?

2024-05-14T11:20:16.833Z - info: [ui] [AppStore] loading 16 repositories from store

@hszequel
Copy link
Author

All the repositories are valid. Some of these repositories are on GitHub. The ones that are on Azure DevOps have been replaced.

@hszequel
Copy link
Author

After several days unable to use GitHub efficiently, I found a workaround:

Reverted to version 3.3.14 (works perfectly) and renamed Update.exe under the GitHubDesktop folder to disable auto-update until this issue is resolved.

@sergiou87
Copy link
Member

Hello 👋

Please, try the latest beta (3.3.19-beta2) from https://desktop.github.com/beta which includes support for multiple git credentials on the same host based on different repository paths and let us know if it works.

After updating, you might need to re-enter your credentials for your Azure DevOps repositories.

For hosts other than dev.azure.com, you might need to set useHttpPath to true for whatever domain your repos are hosted on. For example, for gitlab:

git config --global credential.https://gitlab.com.useHttpPath true

Thank you for your patience 🙏

@sergiou87
Copy link
Member

You can download 3.4.0 now from https://desktop.github.com (auto-updates are rolled out progressively and might take longer)

Closing this now, thank you for your patience 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants