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

Fatal: java.lang.RuntimeException encountered on Ubuntu VM through SSH #103

Open
YoDaMa opened this issue Nov 14, 2018 · 4 comments
Open

Comments

@YoDaMa
Copy link

YoDaMa commented Nov 14, 2018

Operating System: Ubuntu 18.04.1 LTS (Bionic Beaver)
Issue: Credential Manager is not working on first git pull.
Repro Steps:

Using MobaXTerm as an SSH client.
Following installation using homebrew:

$ sudo apt install linuxbrew-wrapper
$ brew install git-credential-manager
$ git-credential-manager install

Then on a Git push:

$ git push
Fatal: java.lang.RuntimeException encountered.  Details:
Secure credential storage is not available on this operating system. You may opt-in to store credentials in an unencrypted file under your user home directory by running 'git config --global credential.canFallBackToInsecureStore true'.
fatal: credential helper '!/home/linuxbrew/.linuxbrew/Cellar/jdk/9.0.4/bin/java -Ddebug=false -Djava.net.useSystemProxies=true -jar /home/linuxbrew/.linuxbrew/Cellar/git-credential-manager/2.0.4/libexec/git-credential-manager-2.0.4.jar' told us to quit

Not sure the cause of this error.

@mattcobley
Copy link

mattcobley commented Nov 15, 2018

I get the exact same error on a fresh install or liveCD of Ubuntu 18.04 or Kubuntu 18.04 (not via SSH, just in a regular terminal). The process I am following is the following and is the same on each environment:
Install Java 8 using the Oracle installer by running:

sudo add-apt-repository ppa:webupd8team/java
sudo apt update
sudo apt install oracle-java8-installer

Checked, and Java is available in my path - i.e. if I just type "java" the help options appear.

Then installed Linuxbrew following the instructions here: http://linuxbrew.sh/ i.e. running:

sudo apt install curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"

test -d ~/.linuxbrew && PATH="$HOME/.linuxbrew/bin:$HOME/.linuxbrew/sbin:$PATH"
test -d /home/linuxbrew/.linuxbrew && PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH"
test -r ~/.bash_profile && echo "export PATH='$(brew --prefix)/bin:$(brew --prefix)/sbin'":'"$PATH"' >>~/.bash_profile
echo "export PATH='$(brew --prefix)/bin:$(brew --prefix)/sbin'":'"$PATH"' >>~/.profile

Then installed GCM using the installation instructions in the Install.md file:

brew update
brew install git-credential-manager
git-credential-manager install

Note that nothing appears to happen after running the last command - not sure if that is okay or not.

Then tried running:
git clone <URL from VSTS>
as usual to clone a repo (which works fine in Git for Windows with Git Credential Manager installed), and get the same error that YoDaMa was getting above when just running that command:

Fatal: java.lang.RuntimeException encountered.  Details:
Secure credential storage is not available on this operating system. You may opt-in to store credentials in an unencrypted file under your user home directory by running 'git config --global credential.canFallBackToInsecureStore true'.
fatal: credential helper '!/usr/lib/jvm/java-8-oracle/jre/bin/java -Ddebug=false -Djava.net.useSystemProxies=true -jar /home/ubuntu/.linuxbrew/Cellar/git-credential-manager/2.0.4/libexec/git-credential-manager-2.0.4.jar' told us to quit

@mattcobley
Copy link

@pjdv2 thanks for the reminder about SSH authentication as an alternative. Would still be nice for this to get fixed though.

@ghost
Copy link

ghost commented Nov 23, 2018

@pjdv2 thanks for the reminder about SSH authentication as an alternative. Would still be nice for this to get fixed though.

I think SSH is probably still best to use at this moment. Check this reply as well. You may pass the exception, if you haven't installed GNOME Keyring, for example (as in #97), but then you still need to authenticate and this is another issue (see #102).

@latefield
Copy link

This is still a problem under Windows Subsystem for Linux with Ubuntu 20.04 and git-credential-manager installed using homebrew.

I get the following error the first time I try to pull a repo:

Fatal: java.lang.RuntimeException encountered.  Details:
Secure credential storage is not available on this operating system. You may opt-in to store credentials in an unencrypted file under your user home directory by running 'git config --global credential.canFallBackToInsecureStore true'.
fatal: credential helper '!/home/linuxbrew/.linuxbrew/Cellar/openjdk/14.0.1/libexec/bin/java -Ddebug=false -Djava.net.useSystemProxies=true -jar /home/linuxbrew/.linuxbrew/Cellar/git-credential-manager/2.0.4_2/libexec/git-credential-manager-2.0.4.jar' told us to quit

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

3 participants