Saturday, August 13, 2016

Git Eclipse TFS 401 403 Unauthorized

Eclipse Git plugin eGit used with TFS (Team Foundation Server) causes authentication error:
401 or 403 Unauthorized

Unable to validate SSL certificate.
Unknown certification authority.
SSL verification disabled.

To make command line Git working:
Open: Edit Environment Variables For Your Account
Set user environment variable:

To make eGit working, open Eclipse menu:
/ Window / Preferences / Team / Git / Configuration

Open tab User Settings:
Location: D:\.gitconfig
          sslVerify = true
            helper = wincred

Open tab System Settings:
Location: C:\software\git\mingw64\etc\gitconfig
            helper = manager

Details explained:
Due to issue jGit, eGit has to be configured as "sslVerify = true" to work properly. Otherwise causes "401 Unauthorized".
Command line Git needs "sslVerify = false", that is exactly oposite than eGit configuration. Fortunately, this directive can be overriden later by environment variable "GIT_SSL_NO_VERIFY=true".
Problem solved.

No comments: