1

Due to certain..world events, I have to work remotely outside our company proxy. I have unset the proxy settings eveywhere and everything works fine except Git. When I try to pull or push to our AWS CodeCommit repositories, I get this:

nc: getaddrinfo for host "proxy.xxxxxxxxx.net" port 8080: Name or service not known
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

This is my git config file:

[user]
    name = Me
    email = [email protected]
[credential]
        helper = !aws codecommit --profile default credential-helper $@
        UseHttpPath = true  

SSH config
    #ProxyCommand nc -X connect -x proxy.xxxxxxxxx.net:8080 %h %p
    IdentityFile ~/.ssh/id_rsa
    User=AWSUSER
    HostName git-codecommit.eu-west-1.amazonaws.com

As you can see I have commented the proxy command. If I uncomment it and change the port for example, git will fail with the new port. Thus I seem to able to configure it here somewhat.

Then I saw this post How to remove http proxy for git?

and I ran

git config -l

This printed:

url.git://git.global.x.net:9420/repo.git.insteadof=https://gerrit.googlesource.com/git-repo
url.git://git.global.x.net:9420/repo.git.insteadof=https://android.googlesource.com/tools/repo
url.ssh://git.global.x.net/.insteadof=git://android.git.kernel.org/
url.ssh://git.global.x.net/.insteadof=git://codeaurora.org/
url.ssh://git.global.x.net/.insteadof=https://android.x.com/
url.ssh://git.global.x.net/.insteadof=git://git.global.x.net/
filter.lfs.clean=git lfs clean %f
filter.lfs.smudge=git lfs smudge %f
filter.lfs.required=true
user.name=me
[email protected]
credential.helper=!aws codecommit --profile default credential-helper $@
credential.usehttppath=true
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=ssh://dev/v1/repos/projects
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
branch.staging.remote=origin
branch.staging.merge=refs/heads/staging
branch.develop.remote=origin
branch.develop.merge=refs/heads/develop

At first I got exicted when loking at the replacements but I came to realize that none of them matches the proxy that git tries to connect to. Clearing these settings with git config --global --unset http.proxy does not seem to do anything.

Can I somehow clear all proxy settings in Git?

0

You must log in to answer this question.

Browse other questions tagged .