简体   繁体   中英

Eclipse: setting path to git executable - OS X El Capitan

I get the error below when I try to push:

"An internal Exception occurred during push: URI not supported: sso:..."

SourceTree and IntelliJ allow to set git's executable path but not Eclipse which is always /usr/bin/git .

Note:

  1. My git path is /usr/local/git/current/bin/git .
  2. I can't symlink it to /usr/bin/git due to SIP , and I'm not allowed to disable it.
  3. I can't change the URL, it must stay sso:// .
  4. I set /usr/local/git/current/bin/git first thing in $PATH, but Eclipse ignores it.
  5. Versions:

    • /usr/local/git/current/bin/git - 2.7.0
    • /usr/bin/git - git version 2.5.4 (Apple Git-61)
    • Eclipse - 4.5.2
    • Eclipse EGit- 4.2.0.201601211800-r

The only solution I thought about is to set the path through: Eclipse > Team > Git > Configuration , but I don't know what is the key, if there is any.

Eclipse uses EGit exclusively for git operations, which in turn uses JGit which is a port of native git to Java running inside Eclipse itself.

In other words, Eclipse does not rely on any native git on the system.

I would suggest raising an issue with the JGit project for the sso protocol, and use git push manually from the command line for the time being. You should be able to use Eclipse for all other git operations (not involving talking to origin).

See Using native git not jgit in Eclipse git? for more detail.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM