Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Error on CentOS 6.7 with git credential manager 2.0.2 #62

Closed
eqbalz opened this issue Feb 8, 2017 · 2 comments
Closed

Error on CentOS 6.7 with git credential manager 2.0.2 #62

eqbalz opened this issue Feb 8, 2017 · 2 comments

Comments

@eqbalz
Copy link

eqbalz commented Feb 8, 2017

I installed this on CentOS following the instructions. But unable to get it to work. I get no pop-up window to login with 2FA. When running with debug I get the following errors when running in a shell terminal with X Window Server running:

Program::ComponentFactory::createSecureStore
gnome-keyring library loaded, creating a password SCHEMA
Could not get default keyring info. GNOME Keyring is not available.
Return code: 2 description: The gnome-keyring-daemon application is not running.
Getting a persistent token store that must be secure
Getting a persistent credential store that must be secure
Fatal error encountered.  Details:
java.lang.IllegalArgumentException: tokenSecretStore can't be null
        at com.microsoft.alm.authentication.SecretStoreAdapter.<init>(SecretStoreAdapter.java:17)
        at com.microsoft.alm.gitcredentialmanager.Program$ComponentFactory.createSecureStore(Program.java:1192)
        at com.microsoft.alm.gitcredentialmanager.Program.initialize(Program.java:882)
        at com.microsoft.alm.gitcredentialmanager.Program.get(Program.java:292)
        at com.microsoft.alm.gitcredentialmanager.Program.access$200(Program.java:63)
        at com.microsoft.alm.gitcredentialmanager.Program$3.call(Program.java:284)
        at com.microsoft.alm.gitcredentialmanager.Program$3.call(Program.java:281)
        at com.microsoft.alm.gitcredentialmanager.Program.innerMain(Program.java:195)
        at com.microsoft.alm.gitcredentialmanager.Program.main(Program.java:123)
fatal: credential helper '!/usr/java/jdk1.8.0_92/jre/bin/java -Ddebug=true -Djava.net.useSystemProxies=true -jar /usr/lib/git-credential-manager-2.0.2.jar' told us to qui
t

Strangely enough I get a different error when running inside a GUI terminal (with xrdp):

Program::ComponentFactory::createSecureStore
gnome-keyring library loaded, creating a password SCHEMA
Try access gnome-keyring with dummy data to make sure it's accessible...
Keyring is locked, most likely due to UI is unavailable or user logged in automatically without supplying a password.
Keyring is locked and unavailable, please set variable AUTH_LIB_ALLOW_UNLOCK_GNOME_KEYRING to allow unlocking the keyring with a popup dialog.
Getting a persistent token store that must be secure
Getting a persistent credential store that must be secure
Fatal error encountered.  Details:
java.lang.IllegalArgumentException: tokenSecretStore can't be null
        at com.microsoft.alm.authentication.SecretStoreAdapter.<init>(SecretStoreAdapter.java:17)
        at com.microsoft.alm.gitcredentialmanager.Program$ComponentFactory.createSecureStore(Program.java:1192)
        at com.microsoft.alm.gitcredentialmanager.Program.initialize(Program.java:882)
        at com.microsoft.alm.gitcredentialmanager.Program.get(Program.java:292)
        at com.microsoft.alm.gitcredentialmanager.Program.access$200(Program.java:63)
        at com.microsoft.alm.gitcredentialmanager.Program$3.call(Program.java:284)
        at com.microsoft.alm.gitcredentialmanager.Program$3.call(Program.java:281)
        at com.microsoft.alm.gitcredentialmanager.Program.innerMain(Program.java:195)
        at com.microsoft.alm.gitcredentialmanager.Program.main(Program.java:123)
fatal: credential helper '!/usr/java/jdk1.8.0_92/jre/bin/java -Ddebug=true -Djava.net.useSystemProxies=true -jar /usr/lib/git-credential-manager-2.0.2.jar' told us to qui
t

Not sure what is going on.

@eqbalz eqbalz changed the title Unable to get this to work on CentOS 6.7 Error on CentOS 6.7 Feb 8, 2017
@eqbalz eqbalz changed the title Error on CentOS 6.7 Error on CentOS 6.7 with git credential manager 2.0.2 Feb 8, 2017
@yacaovsnc
Copy link
Member

yacaovsnc commented Feb 13, 2017

The credential manager tries to save the generated Personal Access Token (PAT) to a secure place, and on Linux we try to save the PAT to the "login" keyring of Gnome Keyring.

Gnome keyring isn't accessible if you connect via ssh. That's the first error you see.

Also if the login keyring is locked, we won't be able to access it. If you login without passwords, the login keyring maybe still locked. Could you please set the suggested environment variable AUTH_LIB_ALLOW_UNLOCK_GNOME_KEYRING to true and try again?

Thanks.

@yacaovsnc
Copy link
Member

If you still can't unlock gnome-keyring, you could try this option:
git config --global credential.canFallBackToInsecureStore true

If this is set, it will fallback to use insecure files to store your credential. The generated file is at:
~/.VSTeamServicesAuthPlugin/insecureStore.xml

Closing for inactivity.

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

No branches or pull requests

2 participants