Closed xsoheilalizadeh closed 5 years ago
I get a similar issue if TF.exe is unable to complete its checkout operation. Did you correctly set the parent and workspace directory when you attempted to create the workspace?
Still the same on 1.150.0
Same issue here. The first git pull worked, now when I try to push, fetch or whatever, I'm asked to login to my Microsoft account. I insert email, password, confirm 2FA on my phone... and then it asks to login again in a loop.
İ have face with this loop (oauth2 asking email and pass again and again) after update ubuntu 18.04 to 18.10
Having the same issue here. Keep getting prompted to sign in.
Same issue here on Ubuntu 18.10, using 2FA.
I: 1/ Open Rider 2/ Click "Checkout with VSTS" 3/ A login box comes up, type in email, password, and then confirm 2FA 4/ A list of all my repos comes up, so I choose the repository, and click clone. 5/ It asks me to sign in again, closes the window, thinks for a second, then reopens the window and loops.
I have exactly the same issue-
System info:
- IntelliJ 2018.2.5
- Ubuntu 18.10
- Visual Studio Team Services Plugin 1.150.0
- JDK 1.8.0 (x64)
Here are some anonymized log messages:
2018-11-04 14:59:58,213 [ 30382] WARN - n.settings.TeamServicesSecrets - getServerContextSecrets: info was null for key:
2018-11-04 14:59:58,213 [ 30382] INFO - .checkout.VsoCheckoutPageModel - Skipping loading contexts in constructor
2018-11-04 15:00:00,459 [ 32628] INFO - .checkout.VsoCheckoutPageModel - loadRepositories called
2018-11-04 15:00:00,460 [ 32629] INFO - tion.VsoAuthenticationProvider - authenticateAsync for server: https://app.vssps.visualstudio.com
2018-11-04 15:00:00,701 [ 32870] INFO - .auth.pat.VstsPatAuthenticator - Signing out from uri: https://app.vssps.visualstudio.com
2018-11-04 15:00:00,731 [ 32900] INFO - auth.oauth.OAuth2Authenticator - Ready to launch browser flow to retrieve oauth2 token.
2018-11-04 15:00:00,734 [ 32903] INFO - oft.alm.helpers.SettingsHelper - Searching for /home/REPLACED_USERNAME/.microsoft/VstsAuthLib4J/settings.properties
2018-11-04 15:00:00,734 [ 32903] INFO - auth.oauth.OAuth2Authenticator - Attempt to use oauth2-useragent provider: none
2018-11-04 15:00:00,734 [ 32903] INFO - auth.oauth.OAuth2Authenticator - Fallback to Device Flow.
2018-11-04 15:00:39,879 [ 72048] INFO - .services.HttpProxyServiceImpl - useHttpProxy: false
2018-11-04 15:00:41,651 [ 73820] INFO - tion.VsoAuthenticationProvider - getAuthenticationInfoAsync succeeded
2018-11-04 15:00:41,653 [ 73822] INFO - .services.HttpProxyServiceImpl - useHttpProxy: false
2018-11-04 15:00:42,877 [ 75046] INFO - on.ServerContextLookupListener - loadContexts activeOperation with 1 contexts and a scope of REPOSITORY
2018-11-04 15:00:42,878 [ 75047] INFO - on.ServerContextLookupListener - loadContexts terminateActiveOperation in state NOT_STARTED
2018-11-04 15:00:42,878 [ 75047] INFO - on.ServerContextLookupListener - ServerContext operation terminated
2018-11-04 15:00:42,879 [ 75048] INFO - on.ServerContextLookupListener - ServerContext lookup started
2018-11-04 15:00:42,885 [ 75054] INFO - .services.HttpProxyServiceImpl - useHttpProxy: false
2018-11-04 15:00:44,344 [ 76513] INFO - on.ServerContextLookupListener - ServerContext lookup results has error: false
2018-11-04 15:00:44,345 [ 76514] INFO - on.ServerContextLookupListener - ServerContext lookup completed
2018-11-04 15:00:44,358 [ 76527] INFO - on.ServerContextLookupListener - ServerContext operation done
2018-11-04 15:00:50,525 [ 82694] INFO - .services.HttpProxyServiceImpl - useHttpProxy: false
2018-11-04 15:00:51,576 [ 83745] INFO - .auth.pat.VstsPatAuthenticator - Retrieving PersonalAccessToken for uri:https://REPLACED_URL_PART.visualstudio.com with name:VSTS IntelliJ Plugin: ChristopherWolf.87@live.de from: vWolverine on: Sun Nov 04 15:00:51 CET 2018, and with scope:, prompt behavior: AUTO
2018-11-04 15:00:53,146 [ 85315] INFO - #git4idea.commands.GitHandler - [.] git version
2018-11-04 15:00:53,156 [ 85325] INFO - #git4idea.commands.GitHandler - git version 2.19.1
2018-11-04 15:00:53,165 [ 85334] INFO - ea.config.GitExecutableManager - Git version for /usr/bin/git : 2.19.1
2018-11-04 15:00:53,166 [ 85335] INFO - #git4idea.commands.GitHandler - [/home/REPLACED_USERNAME/XYZ] git clone --progress https://REPLACED_URL_PART.visualstudio.com/DefaultCollection/XYZ/_git/REPLACED_PROJECT_NAME -- REPLACED_PROJECT_NAME
2018-11-04 15:00:53,173 [ 85342] INFO - #git4idea.commands.GitHandler - Cloning into 'REPLACED_PROJECT_NAME'...
2018-11-04 15:00:54,165 [ 86334] INFO - n.context.ServerContextManager - AuthenticatedInfo found for url http://REPLACED_URL_PART.visualstudio.com
2018-11-04 15:00:54,690 [ 86859] INFO - #git4idea.commands.GitHandler - fatal: Authentication failed for 'https://REPLACED_URL_PART.visualstudio.com/DefaultCollection/XYZ/_git/REPLACED_PROJECT_NAME/'
2018-11-04 15:00:54,698 [ 86867] INFO - n.context.ServerContextManager - Updating auth info for url https://REPLACED_URL_PART.visualstudio.com
2018-11-04 15:00:54,698 [ 86867] INFO - n.context.ServerContextManager - auth info updateAuthenticationInfo compare /DefaultCollection/XYZ/_git/REPLACED_PROJECT_NAME
2018-11-04 15:00:54,699 [ 86868] INFO - n.context.ServerContextManager - auth info updateAuthenticationInfo removed
2018-11-04 15:00:54,699 [ 86868] INFO - n.context.ServerContextManager - auth info updateAuthenticationInfo prompting
2018-11-04 15:00:54,699 [ 86868] INFO - .auth.pat.VstsPatAuthenticator - Signing out from uri: https://REPLACED_URL_PART.visualstudio.com
2018-11-04 15:00:54,700 [ 86869] INFO - ugin.authentication.AuthHelper - getAuthenticationInfoSynchronously calling authenticateAsync on https://REPLACED_URL_PART.visualstudio.com
2018-11-04 15:00:54,701 [ 86870] INFO - tion.VsoAuthenticationProvider - authenticateAsync for server: https://REPLACED_URL_PART.visualstudio.com
2018-11-04 15:00:54,701 [ 86870] INFO - .auth.pat.VstsPatAuthenticator - Signing out from uri: https://app.vssps.visualstudio.com
2018-11-04 15:00:54,701 [ 86870] INFO - auth.oauth.OAuth2Authenticator - Ready to launch browser flow to retrieve oauth2 token.
2018-11-04 15:00:54,703 [ 86872] INFO - auth.oauth.OAuth2Authenticator - Attempt to use oauth2-useragent provider: none
2018-11-04 15:00:54,703 [ 86872] INFO - auth.oauth.OAuth2Authenticator - Fallback to Device Flow.
2018-11-04 15:01:23,031 [ 115200] INFO - .services.HttpProxyServiceImpl - useHttpProxy: false
2018-11-04 15:01:24,109 [ 116278] INFO - .auth.pat.VstsPatAuthenticator - Retrieving PersonalAccessToken for uri:https://REPLACED_URL_PART.visualstudio.com with name:VSTS IntelliJ Plugin: ChristopherWolf.87@live.de from: vWolverine on: Sun Nov 04 15:01:24 CET 2018, and with scope:, prompt behavior: AUTO
2018-11-04 15:01:25,323 [ 117492] INFO - tion.VsoAuthenticationProvider - getAuthenticationInfoAsync succeeded
2018-11-04 15:01:25,323 [ 117492] INFO - .services.HttpProxyServiceImpl - useHttpProxy: false
2018-11-04 15:01:25,673 [ 117842] INFO - n.context.ServerContextManager - auth info updateAuthenticationInfo not null
2018-11-04 15:01:25,673 [ 117842] INFO - n.context.ServerContextManager - https://REPLACED_URL_PART.visualstudio.com/DefaultCollection/XYZ/_git/REPLACED_PROJECT_NAME https://REPLACED_URL_PART.visualstudio.com
2018-11-04 15:01:25,673 [ 117842] INFO - n.context.ServerContextManager - The updated auth info created a context that has a different remote url
2018-11-04 15:01:25,673 [ 117842] INFO - n.context.ServerContextManager - auth info updateAuthenticationInfo compare
2018-11-04 15:01:25,674 [ 117843] INFO - n.context.ServerContextManager - auth info updateAuthenticationInfo returning an updated context: false
2018-11-04 15:01:25,674 [ 117843] INFO - #git4idea.commands.GitHandler - git clone took 32508 ms. Command parameters:
/usr/bin/git clone --progress https://REPLACED_URL_PART.visualstudio.com/DefaultCollection/XYZ/_git/REPLACED_PROJECT_NAME -- REPLACED_PROJECT_NAME
2018-11-04 15:01:25,675 [ 117844] INFO - #git4idea.commands.GitHandler - [/home/REPLACED_USERNAME/XYZ] git -c core.quotepath=false -c log.showSignature=false clone --progress --recurse-submodules https://REPLACED_URL_PART.visualstudio.com/DefaultCollection/XYZ/_git/REPLACED_PROJECT_NAME -- REPLACED_PROJECT_NAME
2018-11-04 15:01:25,680 [ 117849] INFO - #git4idea.commands.GitHandler - Cloning into 'REPLACED_PROJECT_NAME'...
2018-11-04 15:01:26,723 [ 118892] INFO - #git4idea.commands.GitHandler - fatal: Authentication failed for 'https://REPLACED_URL_PART.visualstudio.com/DefaultCollection/XYZ/_git/REPLACED_PROJECT_NAME/'
2018-11-04 15:01:26,728 [ 118897] INFO - n.context.ServerContextManager - Updating auth info for url https://REPLACED_URL_PART.visualstudio.com
2018-11-04 15:01:26,729 [ 118898] INFO - n.context.ServerContextManager - auth info updateAuthenticationInfo compare
2018-11-04 15:01:26,729 [ 118898] INFO - n.context.ServerContextManager - auth info updateAuthenticationInfo removed
2018-11-04 15:01:26,729 [ 118898] INFO - n.context.ServerContextManager - auth info updateAuthenticationInfo prompting
2018-11-04 15:01:26,730 [ 118899] INFO - .auth.pat.VstsPatAuthenticator - Signing out from uri: https://REPLACED_URL_PART.visualstudio.com
2018-11-04 15:01:26,730 [ 118899] INFO - ugin.authentication.AuthHelper - getAuthenticationInfoSynchronously calling authenticateAsync on https://REPLACED_URL_PART.visualstudio.com
2018-11-04 15:01:26,730 [ 118899] INFO - tion.VsoAuthenticationProvider - authenticateAsync for server: https://REPLACED_URL_PART.visualstudio.com
2018-11-04 15:01:26,730 [ 118899] INFO - .auth.pat.VstsPatAuthenticator - Signing out from uri: https://app.vssps.visualstudio.com
2018-11-04 15:01:26,730 [ 118899] INFO - auth.oauth.OAuth2Authenticator - Ready to launch browser flow to retrieve oauth2 token.
2018-11-04 15:01:26,730 [ 118899] INFO - auth.oauth.OAuth2Authenticator - Attempt to use oauth2-useragent provider: none
2018-11-04 15:01:26,730 [ 118899] INFO - auth.oauth.OAuth2Authenticator - Fallback to Device Flow.
If I try to clone manually via SSH everything works fine.
Tried also with device flow authentication (in File -> Settings -> Version Control -> Team Services / TFS ) but the same loop occurs
Tried also with device flow authentication (in File -> Settings -> Version Control -> Team Services / TFS ) but the same loop occurs
Yes, I tried it too without success. Furthermore I've tried to use IntelliJ 2017.03, but it results in exactly the same behavior like described above.
Any solution?
Any solution?
disable the plugin and do git pulls/pushes the classic way
Edit: if you re-enable the plugin after a while it works
+1 same issue
the same here
the same here
the same here
Seeing the same
Also getting the endless auth loop
Same issue here..
Same.. just started recently for my team.
Has anybody tried completely reinstalling rider? Does that help? It works for a while until it stops, what's the actual cause?
Also same issue here. Didn't think it would be this hard to setup a Repo in Azure and plug it into my IDE of choice.
Please attach the log if it happened again.
Help -> Compress Logs and Show in Explorer.
@devSoheilAlizadeh as requested.
What's interesting here is that every "KEY_VSO_AUTH_FAILED" gets preceded by the following:
Same issue here..
IntelliJ IDEA 2019.1 (Ultimate Edition) Build #IU-191.6183.87, built on March 27, 2019 JRE: 1.8.0_202-release-1483-b39 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 5.0.3-200.fc29.x86_64
plugin version: 1.150.0
It looks like I was able to achieve a stable reproduction of issue in my environment. Here's the steps to reproduce the issue:
Now, depending on IDEA version and your Git settings, you'll encounter one of the following scenarios:
As you can see, the issue is becoming more serious in more recent versions of IDEA and other IDEA-based IDEs.
The troublesome component is TfGitHttpAuthDataProvider
. This component becomes active if Git asks IDEA for credentials. In IDEA 2017 and 2018, it was a rare case on Windows (only if the credential manager was manually disabled or if the user explicitly canceled the credential manager request), but it now works by default in IDEA 2019.1+, because IDEA now disables the default credential manager when the Git is started from IDEA.
In IDEA 2017, it had one problem: the format of URL it received was not the expected one. Git was sending the following URL: https://username@dev.azure.com
, but the plugin expected the format https://dev.azure.com/username
. The URL was successfully patched inside of an authentication flow (and that's why the authentication seems to work), but it wasn't patched afterwards. So, the plugin was asking the authentication mechanism to provide the credentials for URL https://username@dev.azure.com
, but the mechanism only had the credentials for URL https://dev.azure.com/username
.
It became even worse in IDEA 2018, because now the GitHttpAuthDataProvider
interface is expanded to not pass the username by default (the plugin need to override another method to get the username).
And it became much worse around IDEA 2019, because now IDEA disables the default credential manager, so the plugin's mechanism is suddenly always enabled.
The good news is that now we have a reproduction steps and we're fully aware of the issue. Hopefully we'll be able to fix it very soon. Thanks to everyone who reported here, and we're sorry for the inconveniences caused by this issue. Please stay tuned.
Looking forward to the new release where this is fixed.
In the meantime I have found a fix until this plugin is fixed - tested on the newest IntelliJ IDEA 2019.1.2 at the time of writing.
NOTE: THIS FIX DOES NOT WORK WITH THIS PLUGIN BUT ONLY WITH THE DEFAULT GIT PLUGIN
This fix should remember the credentials properly until your personal access token expires (which you will have to create as part of this process).
For machines already logged in to repository tenant AD:
For machines not logged in to repository tenant AD:
Is there a planned date for the deployment of this patch?
Having the same issue here. Keep getting prompted to sign in.
Waiting for the fix for a while :(
The issue is not fixed in 1.151.2 still getting
getAuthenticationInfoAsync failed
com.microsoft.alm.plugin.exceptions.TeamServicesException: KEY_VSO_AUTH_FAILED at com.microsoft.alm.plugin.authentication.facades.VsoAuthInfoProvider.getAuthenticationInfoAsync(VsoAuthInfoProvider.java:100) at com.microsoft.alm.plugin.authentication.VsoAuthenticationProvider.authenticateAsync(VsoAuthenticationProvider.java:69) at com.microsoft.alm.plugin.authentication.AuthHelper.getAuthenticationInfoSynchronously(AuthHelper.java:59) at com.microsoft.alm.plugin.idea.git.extensions.TfGitHttpAuthDataProvider.getAuthData(TfGitHttpAuthDataProvider.java:39) at git4idea.remote.GitHttpAuthDataProvider.getAuthData(GitHttpAuthDataProvider.java:41)
Installing the available update resolved the issue for me.
Hello, everyone. Sorry for the pause in our release schedule. The new version has been published to the plugin update channel. You should be able to update the plugin in IDE.
@ForNeVeR
Hi. I have the latest version of the Azure DevOps plugin installed for PyCharm and have been using it since yesterday. I want to report that it doesn't fix anything for me. I was hoping it will resolve my problems since I discovered this thread two weeks ago.
I've been having the same symptoms with the plugin for a year. In my case, it is actually a couple of issues. I use Azure DevOps git repo.
I experience the looping authentication prompt problem if I switch my Azure DevOps account URL to https://dev.azure.com/accountname. If I set it to the old URL format of https://accountname.visualstudio.com, the looping stops and authentication succeeds.
After authentication succeeds, my Azure DevOps account credentials appears to be saved and listed in PyCharm under Settings, Version Control, Azure DevOps Services/TFS. However the behavior of having my account info saved is not what I experienced prior to Azure DevOps changing the URL format. Since a few releases ago, I always have to authenticate once with the azure browser prompt and entering the authentication code when I access my repo in PyCharm. So it is always on first access call. I don't have to do it again unless PyCharm is restarted. For each successful first time authentication, a PAT is added to my user account in DevOps.
I've been doing PAT house cleaning once in a while. This is not the end of the world but I am concerned that one day Azure DevOps will retire the old URL and I will have a serious issue.
@tingkchan
I had similar issues you were facing in point 1. I found that I had an incorrect remote setup. The format should be
https://$accountname@dev.azure.com/$accountname/$project/_git/$repositoryname
.
This URL can be found via the clone option in your selected repository.
I believe at one point the URL was https://dev.azure.com/$accountname/$project/_git/$repositoryname
when they first introduced the new URL naming scheme.
@rdadkins
Thanks for the info. But I am seeing different URLs.
If the DevOps organization URL option is set to use https://dev.azure.com/accountname (since Visual Studio Online rebrand), I will run into the looping problem. If I set the URL option to off, it uses the old URL https://accountname.visualstudio.com. My Repository URL is currently stored in PyCharm as: https://accountname.visualstudio.com/DefaultCollection/Project Name/_git/Repo Name
The repo URL is saved automatically. I don't see a way to edit it. This is the only way I've been able to use the plugin, abide dealing with the little annoyance of my issue #2.
I just saw a new release of the plugin in PyCharm. Going to test it now.
@tingkchan
- I experience the looping authentication prompt problem if I switch my Azure DevOps account URL to https://dev.azure.com/accountname. If I set it to the old URL format of https://accountname.visualstudio.com, the looping stops and authentication succeeds.
Сould you please provide more detailed steps for me to reproduce? E.g. which kind of repository I should create (I suppose that's Git and not TFVC, right?), and how exactly are you cloning/creating the repository?
- After authentication succeeds, my Azure DevOps account credentials appears to be saved and listed in PyCharm under Settings, Version Control, Azure DevOps Services/TFS. However the behavior of having my account info saved is not what I experienced prior to Azure DevOps changing the URL format.
It could be an issue of Git interop withing the plugin: sometimes Git uses its own credential helper instead of one provided by IDEA, and it stores the credentials in other way. I sometimes hit this issue, too, but detailed steps to reproduce would help a lot. Screenshots of the auth windows you get would help, too (because Git credential helper and IDEA auth windows looks a bit different, so the screenshots would help in diagnosis).
Please note that this issue was only about getting the exact message that starts the thread: namely, getAuthenticationInfoAsync failed
. If you have some other situation (and it seems that you do), then, please, create a new issue, and I'll be glad to help with the diagnostics, and maybe finally suggesting a fix for the issues you encounter.
Please also report more details about your issues:
If we'll be unable to reproduce the issue, we could also ask you to provide your IDE logs privately (please never post IDE logs in public because they could sometimes contain sensitive data).
@rdadkins, while you're very right that these details were extremely important earlier, currently the plugin is designed in a way agnostic to these URL changes: in simple words, it just strips the username@
part automatically as part of the URL normalization (because otherwise authentication weren't working in some cases), so it shouldn't matter in 1.152.0 released yesterday.
If you think that the URL difference is still important in some cases, then I'd like to discuss these cases in more details, because they should not be matter in 1.152.0.
@ForNeVeR I have 1.152.0 and I am using both AppCode 2019.1.3 and Rider 2019.1.2. The issue I was facing with earlier versions of this plugin was that my origin remote was pointed to https://dev.azure.com/$accountname/$project/_git/$repositoryname and I would receive the feedback loop. Once I manually changed the remote URL to https://$accountname@dev.azure.com/$accountname/$project/_git/$repositoryname, it works fine.
However, I just checked in Rider by manually changing the remote URL back to https://dev.azure.com/$accountname/$project/_git/$repositoryname to test it for this issue and I am receiving the feedback loop again.
@ForNeVeR
I am now running the latest version of the plugin. I also figured out that the issue maybe has something to do with the authentication method of "Username and password". With this method the repository URL is saved as https://accountname.visualstudio.com/DefaultCollection/Project Name/_git/Repo Name. Authentication looping will occur if I set the DevOps portal URL to use https://dev.azure.com/accountname. With authentication method set to "Device flow" however, the looping goes away. The repository URL using "Device flow" is saved as https://$accountname@dev.azure.com/$accountname/$project/_git/$repositoryname.
This is what I am talking about in regards to authentication prompts. I am always prompted on first repo access even when it is working. Let me know if it is normal behavior. But it was not this way a year ago.
Please also report more details about your issues: exact version of JetBrains IDE you're using, PyCharm 2019.1.3 (Professional Edition) Build #PY-191.7479.30, built on May 29, 2019 Licensed to xxxxxxxx Subscription is active until May 6, 2020 JRE: 11.0.2+9-b159.60 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 5.0.0-16-generic
The issues are identical across my three computers. They are Linux machines running Kubuntu 19.04, Lubuntu 19.04 and OpenSuse Leap 15.
exact version of Azure DevOps plugin installed, 1.152.0
exact steps to reproduce the issue (if possible) To cause looping:
screenshots of every important step, including screen shots of every auth window you encounter (with your personal data removed, of course) Images are above.
@tingkchan we're definitely onto something, but I still was unable to reproduce the issue.
When I clone the repository using the plugin (in the main menu: VCS | Checkout from Version Control | Azure DevOps Git), the resulting Git remote has address starting from $username@dev.azure.com
. I am unable to get URL without $username@
, could you please elaborate on that? How are you cloning the repository?
I have also troubles following your step 1, "Set DevOps Portal URL to use https://dev.azure.com/accountname": how do I perform that?
I am already using the "Username and password" authentication method (because it causes most of the troubles and thus demands more testing).
@ForNeVeR
Step 1 refers to setting the organization URL. It's the first item if you go into Organization Settings. This setting was introduced when Visual Studio Online was rebranded to Azure DevOps. I noticed this problem a while back. I simply brushed it aside and kept my setting on using the old VSO URL which is https://accountname.visualstudio.com. I was hoping that it will fix itself when new updates are released. I don't know if you will have this option if your account was set up after the rebranding. I had my account back when it was VSO.
In the beginning (around the summer or fall 2018), I could not authenticate at all to Azure DeVops using the plugin if I change the setting to use https://dev.azure.com/accountname. I was not able to get a list of projects to clone from PyCharm's startup project screen. I could not access my account, period. I stuck with the old URL setting because I have no choice.
On each plugin update I would give it try with the new URL setting. Finally I was able to authenticate with the new URL setting ON. But it would do the authentication looping when I click "Clone". So the symptoms are that I can authenticate to get a list of my projects in DevOps, but then it prompts me to reauthenticate when I click "Clone". This reauthentication would keep reprompting until I close the authentication window popup with the random code. Doing this will cause an exception screen. Sorry I never get around to report this other issue. But it can be reproduced.
Another scenario is that if I change the DevOps organization URL to the new URL, existing projects that were already stored in PyCharm will result in authentication looping when authentication is needed, ie pulls and pushes.
Version 1.152.0 is progress and better than the previous versions since I am now able to use "Device flow" as a workaround. One thing I noticed though is that with "Device flow", after authentication the account info is temperarily saved until I close PyCharm. By that I mean if I look at the plugin settings I will see my account and repo URL info like the one I show you in my last post. They become empty if I close PyCharm. Should the info be saved permanently or is this how "Device flow" work. But I guess this is why I need to authenticate once everytime I use PyCharm, since it doesn't have any info stored.
Here is the image of the setting:
@tingkchan thanks, got it. FYI, the "new" accounts have an option to switch to "old" URL, too. Also, now I think I understand your problem with the plugin not saving credentials between sessions, I'll extract the essential information into a new issue.
Could you please clarify how are you cloning the repository? Here you say
But it would do the authentication looping when I click "Clone".
Where are you clicking that? I've found this "Clone" button in the Azure DevOps web interface:
When I clone over HTTPS, it adds the username to the URL, and when I choose to clone over SSH, it doesn't. Is it the clone function you refer to? Do you use SSH?
@ForNeVeR
I do it from my desktop in PyCharm.
Step 1. Startup Screen. I pick the DevOps Git option and I will get the authentication code pop up. Perform authentication and move step 2.
Step 2. After I authenticated in Step 1. I get this popup with a list of projects in my DevOps account. Select project and then click the "Clone" buttton and I will get prompted for authentication again. After authentication passes I will get prompted again. And on and on.
Okay, could you please also check the resulting remote URL? git remote -v
in terminal.
@ForNeVeR
Hello,
Urls from step1 authentication. X replaced actual values. Authenticated and got list of projects.
origin https://xxxxxx.visualstudio.com/DefaultCollection/X%20X%20X/_git/X-X-X (fetch) origin https://xxxxxx.visualstudio.com/DefaultCollection/X%20X%20X/_git/X-X-X (push)
Urls from step2 after selecting my project and clicking "Clone". git remote -v returns the URL below and I get prompted for authentication, random code, browser pops up again, enter code and then my user credentials.
origin https://xxxxxx.visualstudio.com/DefaultCollection/X%20X%20X/_git/X-X-X (fetch) origin https://xxxxxx.visualstudio.com/DefaultCollection/X%20X%20X/_git/X-X-X (push)
In PyCharm's settings though, I see:
@tingkchan could you also please show result of this shell command?
git config --get credential.helper
@tingkchan for now, I was unable to reproduce your issue.
I've set my Azure DevOps organization to use "old" URL (https://username.visualstudio.com) and cloned several projects without any issues.
What is very strange is that your cloned repository URL contains visualstudio.com
while all your screenshots only contain username@dev.azure.com
and no traces of visualstudio.com
. I've verified that the plugin works with that well though, so, for now, we have no explanations of why it doesn't work for you.
@ForNeVeR
Running "git config --get credential.helper" returns nothing.
Regarding the screenshots. Yes, it's weird. The ones above were captured as soon I cloned and opened the project. I want to update a statement I previously made. I thought it was after each PyCharm run but that's not the case. The git credentials will stay in PyCharm after first authentication for as long I remained logged onto my computer. If I restart my desktop sessions, the git credentials will be cleared.
Here is more screenshots for you. This is for when I reopen a project on my computer after I had shut down, log out or restared my computer. I have to authenticate if I need to access the repo. The settings were empty first. I checked over and over again.
Here is the screen after first time authentication:
Here is the screen if I decide to do Update credential by clicking the button. I get prompted and authenticated. I get a second row in different format:
If I close PyCharm and then launch it and reopen the project, only the credential from the first screenshot exist.
I am starting to go nuts on this. :-)
@tingkchan looks like your projects has a space in its name. Is that true?
Rider IDE info:
Plugin Info:
Exception:
Explain
When I've tried to login in my TFS account I enter the correct information ( email && password ). also i receive "token added mail".
Logs
idea.log
backend.zip