0

I am able to clone a specific git repository fine, but when I try to push to the repository I get an error

'Received HTTP code 407 from proxy after CONNECT'

I have tried configuring the proxy by doing:

git config --global http.proxy {username@proxy}
git config --global https.proxy {username@proxy}

I am able to do everything else on the repo , like check status, add files to staging area, or view available branches.

What do I need to configure to be able to push to the remote master?

OLIVER.KOO
  • 5,654
  • 3
  • 30
  • 62
William Ross
  • 3,568
  • 7
  • 42
  • 73
  • Possible duplicate of [git returns http error 407 from proxy after CONNECT](https://stackoverflow.com/questions/24907140/git-returns-http-error-407-from-proxy-after-connect) – OLIVER.KOO Aug 08 '17 at 17:12
  • I was looking at that thread, but the issue in that one is with the clone command not being able to go through the proxy. In my case, it's only the push that has an issue and cloning works fine. – William Ross Aug 08 '17 at 17:15
  • did you use `git clone --depth`? is it a shallow clone? – OLIVER.KOO Aug 08 '17 at 17:19
  • It looks like it was a shallow clone, because when I did the command git fetch --depth=1000000, and then tried the push it worked! You can put that as the answer if you like, thanks. – William Ross Aug 08 '17 at 17:26
  • great! that seems to be the common issue people run into. I will put it as the answer – OLIVER.KOO Aug 08 '17 at 17:30

1 Answers1

1

it could have been because it was a shallow clone. did you use git clone --depth? if it is a shallow clone try git fetch --depth=a_large_number then git push should work.

OLIVER.KOO
  • 5,654
  • 3
  • 30
  • 62