4

UPDATE 2018-02-26

Got ssh working instead.

I'd still be interested to know why the https call failed.


Any help on where to look next to allow cloning via https? (Cannot use ssh, port is blocked)

OS

Windows Server 2012 R2 Standard

Install location

C:\Program Files\Git

Command

$ git clone -b <branch_name> https://<PAT>@<company>.visualstudio.com/... <directory>
Cloning into '<directory>'...
fatal: unable to access 'https://<company>.visualstudio.com/...': error setting certificate verify locations:
  CAfile: /mingw64/ssl/certs/ca-bundle.crt
  CApath: none

I can cat the certificate from Git bash

cat /mingw64/ssl/certs/ca-bundle.crt

git config:

$ git config --list
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
rebase.autosquash=true
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
http.sslbackend=openssl
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
credential.helper=manager

No ~/.gitconfig file exists

Trying to use git -c http.sslVerify=false clone ... still fails: (I'm aware this is not secure)

fatal: unable to access 'https://<PAT>@<company>.visualstudio.com/...': error setting certificate verify locations:
  CAfile: /mingw64/ssl/certs/ca-bundle.crt
  CApath: none

Looks like it is still trying to read the certificate?!

Commands all run in Git Bash, both with and without administrative privileges, without change in outcome. The user is an elevated service account. The same configuration and install works on a test server of the same OS, and install location.

3
  • It would be helpful to inspect with procmon which files does it actually tries to read. Make sure you also collect it from child processes (I would assume the correct should be git-http-backend.exe, but I am not sure about it) Commented Feb 19, 2018 at 8:30
  • Please try the solutions over here: stackoverflow.com/questions/34510018/… Commented Feb 19, 2018 at 10:28
  • All those solutions were read before posting, the config values I posted above were correct for the certificate locations. Commented Feb 26, 2018 at 10:43

3 Answers 3

1

I got exactly same error when I incorrectly set http proxy to https address. You can check it by running git config --list.

I had there entry like:

http.proxy=https://myproxy.com:8080

instead of:

http.proxy=http://myproxy.com:8080
Sign up to request clarification or add additional context in comments.

Comments

0

I once had this very same problem

First of all I suggest you to reinstall your GIT client. This may solve your problem, however it may also cause other problems if you are not really careful in deleting every temp/config file while uninstalling it.

After reinstall my GIT won't work anymore:

The following comes from this answer: This problem occured after re-installing git for windows. I'm using git for windows 64-bit on windows 10.

I found out that the installer did not install git anymore in C:/Users/[USER_NAME]/AppData/Local/Programs/Git. Instead it installed it under C:\Program Files\Git.

Nevertheless the old config file C:\ProgramData\Git\config was not edited by the installer. This file still contains the old path so I edited it manually.

E.g. on my system I used

[http]
     sslCAInfo = C:/Programme/Git/mingw64/ssl/certs/ca-bundle.crt

maybe you will have to use Program Files instead

     sslCAInfo = C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt

3 Comments

While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
Included essential parts of the answer
The config values you use are the same config values I have set in my question. I forgot to mention that reinstallation had already been attempted and didn't change anything
0

Encountered this problem on Git-2.16.2-64-bit

downgraded to Git-2.15.0-64-bit

problem gone.


1 Comment

I am not sure downgrading is a Solution

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.