Code Monkey home page Code Monkey logo

Comments (27)

esardaya avatar esardaya commented on July 21, 2024 8

I agree that it's odd that this hasn't been fixed yet.
As a workaround I managed to get it to work by changing the domain of my repo to use visualstudio.com.
I changed:
git clone https://<account>@dev.azure.com/<account>/<project>/_git/<repo>
To:
git clone https://<account>.visualstudio.com/<project>/_git/<repo>

from git-credential-manager-for-mac-and-linux.

ekrapfl avatar ekrapfl commented on July 21, 2024 5

I can also confirm. I was able to work around it by reverting back to the <org>.visualstudio.com address for my clone. There will need to be a fix for this going forward, though.

from git-credential-manager-for-mac-and-linux.

mtosic avatar mtosic commented on July 21, 2024 5

The problem is in https://github.com/Microsoft/Git-Credential-Manager-for-Mac-and-Linux/blob/f332b8068cbbc0ef8e5d6956db44394f9e48be84/src/main/java/com/microsoft/alm/authentication/BaseVsoAuthentication.java#L258-L269

There is a strict check for detecting visualstudio.com domain. If you try to do any operation with dev.azure.com domain (now by default on Azure DevOps) the StringHelper.endsWithIgnoreCase check will fail and revert to basic authorization.

You should also add dev.azure.com domain. The best approach would be to get all the domain lists from remote endpoint, but I'm not sure if such endpoint exists.

I could make a pull request if you're accepting changes.

from git-credential-manager-for-mac-and-linux.

daviddesmet avatar daviddesmet commented on July 21, 2024 5

Was struggling with this for hours until I found this issue. Changing to visualstudio.com also did the trick for me:

git remote set-url origin https://<account>.visualstudio.com/<project>/_git/<repo>

from git-credential-manager-for-mac-and-linux.

jrbriggs avatar jrbriggs commented on July 21, 2024 5

Sorry for the lack of traction here. As several of you have discovered, you can either use the org.visualstudio.com to allow the credential manager to continue to authenticate, or you can use SSH, which is what I'd recommend on both macOS and Linux.

We're currently building a GCM on .NET Core that we expect to have a public preview on macOS later this month which will resolve this issue. I would still recommend SSH usage in all but very specific scenarios once that is available though.

from git-credential-manager-for-mac-and-linux.

alexreg avatar alexreg commented on July 21, 2024 2

Need a fix for this ASAP. Any news?

from git-credential-manager-for-mac-and-linux.

mjl5007 avatar mjl5007 commented on July 21, 2024 2

Same here, still waiting for a fix. How has this not been addressed yet?

from git-credential-manager-for-mac-and-linux.

ashtonian avatar ashtonian commented on July 21, 2024 1

👌

changing to visualstudio.com scheme works, but you will also have to manually visit https://microsoft.com/devicelogin and enter the code.

from git-credential-manager-for-mac-and-linux.

rgiese avatar rgiese commented on July 21, 2024 1

Still a problem, FWIW. How does something like this kick around for months?

from git-credential-manager-for-mac-and-linux.

alexreg avatar alexreg commented on July 21, 2024 1

@rgiese Obviously Microsoft don't care much about this product... it's sad, but there you go.

from git-credential-manager-for-mac-and-linux.

kunjee17 avatar kunjee17 commented on July 21, 2024 1

@mjcheetham thanks for reply. I will give it a shot. Will keep you posted here. And also file another issue.

from git-credential-manager-for-mac-and-linux.

AurisAudentis avatar AurisAudentis commented on July 21, 2024

Can confirm. Is any workaround availiable?

from git-credential-manager-for-mac-and-linux.

Garfield550 avatar Garfield550 commented on July 21, 2024

Add the following to gitconfig could call GCM4ML while interacting with dev.azure.com.

[credential "dev.azure.com"]
       authority = MSA

However, it can't complete the authentication with the following error info.

Fatal: java.lang.Error encountered.  Details:
java.io.FileNotFoundException: https://dev.azure.com/_apis/connectiondata

In my opinion, the problem is in https://github.com/Microsoft/Git-Credential-Manager-for-Mac-and-Linux/blob/7f954d807e45be91798420ba54475b007ee5862f/src/main/java/com/microsoft/alm/authentication/VsoAzureAuthority.java#L354

Azure DevOps uses dev.azure.com/<org> instead of <org>.visualstudio.com as the new naming rule, so the URI should be filled with organization name. Unit tests should also be changed.

from git-credential-manager-for-mac-and-linux.

ondrejgr avatar ondrejgr commented on July 21, 2024

Workaround without switching domain and without SSH:
I've used Personal Access Token instead of SSH successfully.

In my case the Git prompt was "Password for https://[email protected]/:" So I created token name ondrejgr . And I used the generated token as a password.

from git-credential-manager-for-mac-and-linux.

yentheo avatar yentheo commented on July 21, 2024

+1
Weird that his is still an issue, dev.azure.com is available for a long time and this issue already exists for 5 months.

The weird thing is that I wanted to resolve this by not using GCM, just creating a PAT-token on dev.azure.com, but even when the token is valid for 1 year, the next day I need to generate a new one. I guess it has something to do with my keystore settings. But GCM always was a relieve for authenticating with visualstudio.com. I now reverted the domain name to account.visualstudio.com until this issue is resolved.

from git-credential-manager-for-mac-and-linux.

Bferreira5 avatar Bferreira5 commented on July 21, 2024

Still facing this issue.

from git-credential-manager-for-mac-and-linux.

nftw avatar nftw commented on July 21, 2024

@aaronbjork any view on when we can get a fix for this?

from git-credential-manager-for-mac-and-linux.

benc-uk avatar benc-uk commented on July 21, 2024

This is crazy, how is this not fixed? :(

from git-credential-manager-for-mac-and-linux.

octogonz avatar octogonz commented on July 21, 2024

We're currently building a GCM on .NET Core that we expect to have a public preview
on macOS later this month which will resolve this issue. I would still recommend SSH usage
in all but very specific scenarios once that is available though.

@jrbriggs who is this public preview for, then? Why bother implementing GCM for Mac at all?

On Windows, the GCM is a much better experience than SSH or personal access tokens. GCM prompts for a password that "just works" without having to go read instructions about which URL to visit or which text file to edit.

For Mac/Linux, is the underlying issue that the OS provides no easy way to display a Web View that can perform the single-sign on interaction? (In other words, those OS's expect you to compile Chromium from source code and distribute the binary with your application, and accept responsibility for any security issues that this implies?)

from git-credential-manager-for-mac-and-linux.

jrbriggs avatar jrbriggs commented on July 21, 2024

For those of you on macOS, please go try GCM Core's macOS preview release

from git-credential-manager-for-mac-and-linux.

kunjee17 avatar kunjee17 commented on July 21, 2024

@jrbriggs I did install preview release. And it works for azure but breaks every damn git repo I have. Bit bucket, github, gitlab you name it. How to remove it and revert the settings ?

from git-credential-manager-for-mac-and-linux.

mjcheetham avatar mjcheetham commented on July 21, 2024

[..] it works for azure but breaks every damn git repo I have. Bit bucket, github, gitlab you name it.

@kunjee17 I'm sorry to hear this. If you wouldn't mind, please could you open an issue on the GCM Core project, including a description of any error messages and collect the GCM trace logs (the issue template describes how to do this)?

We would like to fix the problems you're experiencing.

How to remove it and revert the settings?

To uninstall the GCM Core preview, please run the following uninstall script from Terminal:

$ sudo /usr/local/share/gcm-core/uninstall.sh

If you installed the GCM4ML "Java GCM" (this product) via Homebrew, you'll need to re-link it, and then reconfigure it as the Git credential helper by running the following commands:

$ brew link git-credential-manager
$ git-credential-manager install

from git-credential-manager-for-mac-and-linux.

kunjee17 avatar kunjee17 commented on July 21, 2024

@mjcheetham I installed 2.0.4 version again, via brew. It started working for now. Thanks for helping.

from git-credential-manager-for-mac-and-linux.

Jucer74 avatar Jucer74 commented on July 21, 2024

Was struggling with this for hours until I found this issue. Changing to visualstudio.com also did the trick for me:

git remote set-url origin https://<account>.visualstudio.com/<project>/_git/<repo>

This Solution Works for me only change the Link in this way

git remote set-url origin https://<account>@dev.azure.com/<organization>/<project>/_git/<repository>

Also I have to change the Alias for the account to allow Special characters in the account name

from git-credential-manager-for-mac-and-linux.

gitjairam avatar gitjairam commented on July 21, 2024

@Jucer74 please let me know what you mean by "Alias for the account to allow Special characters in the account name" ? i have a dot "." in my account name like ("username1.XY") to login windows.

from git-credential-manager-for-mac-and-linux.

gitjairam avatar gitjairam commented on July 21, 2024

Was struggling with this for hours until I found this issue. Changing to visualstudio.com also did the trick for me:

git remote set-url origin https://<account>.visualstudio.com/<project>/_git/<repo>

This Solution Works for me only change the Link in this way

git remote set-url origin https://@dev.azure.com///_git/

Also I have to change the Alias for the account to allow Special characters in the account name

@Jucer74 please let me know what you mean by "Alias for the account to allow Special characters in the account name" ? i have a dot "." in my account name like ("username1.XY") to login windows.

from git-credential-manager-for-mac-and-linux.

mecoFarid avatar mecoFarid commented on July 21, 2024

For those of you on macOS, please go try GCM Core's macOS preview release

Sorry for my language but the same shit happens with this junk on MacOS. No prompt is displayed, it just asks for an organization password.

from git-credential-manager-for-mac-and-linux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.