5

I'm trying to find a working .gitconfig setup that fulfills two requirements:

  • sslVerify must be set to false for internal servers or at least for one specific server
  • a proxy needs to be configured for external repositories (with sslVerify set to true, of course).

My current version gives me access problems when connecting to my internal repo. I guess that somehow that two last instructions are wrong.

[user]
    name = John Doe
    email = [email protected]
[https]
    proxy = http://johndoe:[email protected]:6666
[http]
    proxy = http://johndoe:[email protected]:6666
[http "https://repo.company.com/"]
    sslVerify = false
[https "https://repo.company.com/"]
    sslVerify = false

What is the correct syntax for this case? I use Git 2.12.2.windows.2.

2 Answers 2

1

You must add the proxy field in the config, however the address(field) can be left blank.

Below is a sample config file:

[user]
    name = user
    email = [email protected]
[http]
    sslVerify = true
    proxy = http://user:password@proxy:8080
[https]
    sslVerify = true
    proxy = http://user:password@proxy:8080
[http "https://git.company.com/"]
    sslVerify = false
    proxy = 
[https "https://git.company.com/"]
    sslVerify = false
    proxy = 
[url "[email protected]:"]
    insteadOf = https://somegit.company.com
Sign up to request clarification or add additional context in comments.

Comments

0

you must add the proxy address in your .gitconfig file for your specific :

[http "https://repo.company.com/"]
    sslVerify = false
    proxy = http://johndoe:[email protected]:6666  

Comments

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.