Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Using git clone with a socks5 proxy - mystery

I am trying to access a git repository on a remote server that is on the other side of a private-2-private VPN connection using HTTPS protocol. We have no permission due to Firewall rules, therefore I want/need to use a SOCKS5 proxy.

The proxy is established like (names hidden for privacy):

ssh -N -D 8003 user@host1.remote.net

git configuration for proxy looks like:

http.proxy=socks5h://127.0.0.1:8003
https.proxy=socks5h://127.0.0.1:8003

My "git remote" configuration looks like

zzz https://atc.remote.net/bitbucket/scm/yyy/xxx.git (fetch)
zzz https://atc.remote.net/bitbucket/scm/yyy/xxx.git (push)

Now, the following works OK:

git fetch zzz
git push zzz

So, no problems with the proxy. But when I try

git clone https://atc.remote.net/bitbucket/scm/yyy/xxx.git

It either complains that it cannot resolve  "atc.remote.net" or - after adding host and IP to /etc/hosts - it times out after a minute or so. This seems to suggest, that the clone command does not work with the proxy. Am I doing something stupid here ? Btw - the git client is version 2.31.1 on OpenSuse Tubmbleweed Linux.

Cheers

Martin

1 answer

1 accepted

0 votes
Answer accepted

Typical case of "make yourself a fool on the Internet and find the answer 5 minutes later". OK, it took a night, but still...

Solution: put the git proxy settings in the "--global" section, not on the "--local". Then "clone" will work like a charm. Thinking about it for a moment it is logical. When I "clone", there is no local git config to look at. I had put them into "--local" in order to be flexible when using several remote repositories. DOH...

Anyway, I believe the best way (for me) is for the "clone" case to specify the proxy on the command line. Something like:

git -c "http.proxy=socks5h://127.0.0.1:8003" clone https://atc.remote.net/bitbucket/scm/yyy/xxx.git

Another insight - one does not need "https.proxy".

Cheers

Martin

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

253 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you