Closed RiverLi closed 5 years ago
This is resolved using different way. A microsoft support engineer helped me to find out the root cause. The root cause is my organization set a device rule in our Azure, the device rule does not allow Linux platform. We did not have permission to change the device rule of our organization(we are not subscription admin of our company azure account). It is resolved by generating a credential in VSTS. In the page of VSTS code repository, click "Clone", a pop up came up, and then click "Generate Git credentials". It will generate a set of user name and password for you. Copy and paste it. Save it to a file long time usage. Please see the screen shot.
For example, the user name and password looks like: xxxx@yyyyy.com jreur8re84mdj3k3mdlmsslkrjlkesflk434l5l43j5lk435l43v88 The 1st row is user name. Usually it is your email address used to access VSTS. The 2nd row is password. When use git-credential-manager, a directory structure is created, ~/.VSTeamServicesAuthPlugin If the user is root, it should be /root/.VSTeamServicesAuthPlugin A file named insecureStore.xml in the folder, edit and paste the password you got above to the file. like this:
`<?xml version="1.0" encoding="UTF-8" standalone="no"?>
git-credential-manager on linux failed to get token:
Unmet requirements for the 'JavaFx' provider:
Unmet requirements for the 'StandardWidgetToolkit' provider:
A desktop environment.
token acquisition failed. interactive logon failed VsoAadAuthentication::deviceLogon AzureAuthority::acquireToken
OAuth 2.0 Device Flow authentication
To complete the authentication process, please open a web browser and visit the following URI: https://microsoft.com/devicelogin When prompted, enter the following code: G5RVCDEB4 Once authenticated and authorized, execution will continue. token acquisition failed: com.microsoft.alm.oauth2.useragent.AuthorizationException: Code: interaction_required Description: AADSTS50005: Device platform Unknown used by the user is an unsupported device platform. Supported device platforms are: iOS, Android, Mac, and Windows flavors. Trace ID: 16913ff3-7097-439a-a564-02fd96105300 Correlation ID: 86af02d7-37e0-44c4-a099-6a6929f9c530 Timestamp: 2019-09-16 02:47:28Z failed to acquire token. Logon failed, aborting authentication process. fatal: credential helper '!java -Ddebug=true -Djava.net.useSystemProxies=false -jar /root/RPM/git-credential-manager/git-credential-manager-2.0.4.jar' told us to quit [root@centos121 workassure.labor]# git config --get-all credential.helper !java -Ddebug=true -Djava.net.useSystemProxies=false -jar /root/RPM/git-credential-manager/git-credential-manager-2.0.4.jar