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

Authentication issue #18623

Closed
jonaspetraska7 opened this issue May 15, 2024 · 12 comments
Closed

Authentication issue #18623

jonaspetraska7 opened this issue May 15, 2024 · 12 comments

Comments

@jonaspetraska7
Copy link

The problem

The PAT token gets lost on this scenario :

  1. Have this configuration of repositories added : (with last version that works, 3.3.14)
    (No submodules, nothing special on any of these repo's)
    Repo A : Gitlab private (company) repo 1 (domain 1) (Ssh)
    Repo B : Gitlab private (company) repo 2 (domain 1) (Ssh)
    Repo C : Gitlab private (company) repo 3 (domain 1) (Ssh)
    Repo D : Gitlab private (company) repo 4 (domain 1) (Ssh)
    Repo E : Azure DevOps private (company) repo 1 (domain 2) (PAT)
    Repo F : Azure DevOps private (company) repo 2 (domain 3) (PAT)
  2. Updating to 3.3.18
  3. Getting prompted with authentication failure on Repo F.
  4. Regenerating PAT on DevOps.
  5. Logging in with PAT on Repo F.
  6. Repo F works normally, fetching.
  7. Switching to Repo E. Fetching.
  8. Getting the same error.
  9. Switching BACK to Repo F. Fetching.
  10. The PAT token I added just seconds ago, is lost, seeing same authentication error again.
  11. The Repo's A, B, C, D work fine, even after update.

Release version

3.3.18

Operating system

Windows 11

Steps to reproduce the behavior

The PAT token gets lost on this scenario :

  1. Have this configuration of repositories added : (with last version that works, 3.3.14)
    (No submodules, nothing special on any of these repo's)
    Repo A : Gitlab private (company) repo 1 (domain 1) (Ssh)
    Repo B : Gitlab private (company) repo 2 (domain 1) (Ssh)
    Repo C : Gitlab private (company) repo 3 (domain 1) (Ssh)
    Repo D : Gitlab private (company) repo 4 (domain 1) (Ssh)
    Repo E : Azure DevOps private (company) repo 1 (domain 2) (PAT)
    Repo F : Azure DevOps private (company) repo 2 (domain 3) (PAT)
  2. Updating to 3.3.18
  3. Getting prompted with authentication failure on Repo F.
  4. Regenerating PAT on DevOps.
  5. Logging in with PAT on Repo F.
  6. Repo F works normally, fetching.
  7. Switching to Repo E. Fetching.
  8. Getting the same error.
  9. Switching BACK to Repo F. Fetching.
  10. The PAT token I added just seconds ago, is lost, seeing same authentication error again.
  11. The Repo's A, B, C, D work fine, even after update.

Log files

No response

Screenshots

No response

Additional context

No response

@sergiou87
Copy link
Member

Thanks for your report! This looks similar to #18586 but I think you shouldn't run into this problem if, as you mention, repos E and F are hosted on different domain names (vs let's say dev.azure.com), since the current implementation shares credentials across all repos hosted on the same domain name (even if they have different paths).

Can you confirm domain 2 and domain 3 for repos E and F is correct?

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

jonaspetraska7 commented May 15, 2024

I'm very sorry, that's true, the domain names are the same, but different companies (paths) as you mentioned :
Repo E : https://dev.azure.com/Company1/SomeProject
Repo F : https://dev.azure.com/Company2/AnotherProject

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

Yeah you're going to get burned here by exactly what was described in #18586 due to multiple pats for multiple organizations, Bummer! I went ahead and updated with a single comment that would get you workable for at least one of the orgs: #18586 (comment)

@CharlieDismuke
Copy link

👍🏽 #18586

@veskoanfinity
Copy link

I have same problem with 3.3.18

@chintingtan
Copy link

follow. i have authentication issue after update to 3.3.18 today
2024-05-20.desktop.production.log

@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 🙏

@chintingtan
Copy link

Hi sergiou87,
Thanks for your reply.
I have tried 3.3.19-beta2 but it does not work.
2024-05-27.desktop.beta.log

However, when i rollback to version 3.3.5, it works. i dont see the authentication issue anymore.
Hope this can be fixed soon.
Thanks.

@sergiou87
Copy link
Member

Thanks for your report @chintingtan

I'm looking at your logs and your issue seems slightly different:

fatal: detected dubious ownership in repository at '\\10.6.0.12\vesp\IOPU\FW\RT_Bootloader/.git'
'\\10.6.0.12\vesp\IOPU\FW\RT_Bootloader/.git' is owned by:
	'S-1-5-21-1645522239-1563985344-1417001333-19748'
but the current user is:
	'S-1-5-21-1645522239-1563985344-1417001333-4503'
To add an exception for this directory, call:

	git config --global --add safe.directory '\\10.6.0.12\vesp\IOPU\FW\RT_Bootloader/.git'
fatal: Could not read from remote repository.

Would you mind filing a new issue with your logs so we can help you there more effectively? Thank you 🙏

@chintingtan
Copy link

Ok sure. i will file a new issue.
Thanks.

@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 🙏

@jonaspetraska7
Copy link
Author

3.4.0 fixed the issue, thank you very much :)

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

6 participants