Java error when using git-credential-manager in Mac on OSX?
I had the same issue after I inserted some wrong credentials requested by git
while using IntelliJ
. I solved it by changing the helper
in ~/.gitconfig
, (like @Migg said :). My gitconfig
was pointed to the Java 8
, and how I had already installed Java 8
and Java 11
installed in my machine (OSX 10.14
). I just pointed to the newest version.
Before
[user]
email = <email>
name = <name>
[core]
autocrlf = input
[credential]
helper = !/Library/Java/JavaVirtualMachines/<java-1.8>/Contents/Home/jre/bin/java -Ddebug=false -Djava.net.useSystemProxies=true -jar /usr/local/Cellar/git-credential-manager/2.0.4/libexec/git-credential-manager-2.0.4.jar
After
credential]
helper = !/Library/Java/JavaVirtualMachines/jdk-11.0.3.jdk/Contents/Home/jre/bin/java -Ddebug=false -Djava.net.useSystemProxies=true -jar /usr/local/Cellar/git-credential-manager/2.0.4/libexec/git-credential-manager-2.0.4.jar
Oct. 2017: That is tracked with Microsoft/Git-Credential-Manager-for-Mac-and-Linux issues/69
I dumped Java 9 and installed Java 8, and everything worked just fine.
brew cask remove java
Reinstall git-credential-manager
git-credential-manager install
I stumbled on the same issue as @JoeyHerrington and installed JDK8 instead:
brew cask install caskroom/versions/java8
Update Sept. 2018: the same issue now includes:
version 2.0.4 of Git Credential Manager now supports Java 9+.
The update is available on GitHub and will be available on Homebrew soon.
So the OP (one year later) should not be an problem anymore.
Thomas Hagström adds in the comments:
I would say removing the folders is safest.
sudo rm -rf "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" sudo rm -rf "/Library/PreferencePanes/JavaControlPanel.prefPane" sudo rm -rf "~/Library/Application Support/Oracle" sudo rm -rf "~/Library/Java"
Then reinstall git credential manager so it picks up the correct Java version / virtual machine.