3

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.

Adrian Torrie
  • 2,795
  • 3
  • 40
  • 61
  • It would be helpful to inspect with [procmon](https://learn.microsoft.com/en-us/sysinternals/downloads/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) – max630 Feb 19 '18 at 08:30
  • Please try the solutions over here: https://stackoverflow.com/questions/34510018/unable-to-pull-push-in-git-repository – poke Feb 19 '18 at 10:28
  • All those solutions were read before posting, the config values I posted above were correct for the certificate locations. – Adrian Torrie Feb 26 '18 at 10:43

3 Answers3

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
Dawid Pytel
  • 2,750
  • 1
  • 23
  • 30
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
rakwaht
  • 3,666
  • 3
  • 28
  • 45
  • 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](/review/low-quality-posts/18864737) – Sree Feb 19 '18 at 12:03
  • Included essential parts of the answer – rakwaht Feb 19 '18 at 12:12
  • 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 – Adrian Torrie Feb 26 '18 at 10:43
0

Encountered this problem on Git-2.16.2-64-bit

downgraded to Git-2.15.0-64-bit

problem gone.


mbk
  • 1
  • 1