LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-14-2006, 10:21 AM   #1
anupamsr
Member
 
Registered: Sep 2004
Location: India
Distribution: Kubuntu, Archlinux, Suse, Gentoo, Mandrake
Posts: 371

Rep: Reputation: 30
Unhappy How to access a git repository from behind a proxy (which requires authentication)


I want to access a git repository from behind a proxy (which requires authentication). How to do so?
 
Old 04-14-2006, 07:39 PM   #2
noteventime
Member
 
Registered: Mar 2005
Location: a small planet in the vicinity of Betelgeuse
Distribution: ArchLinux
Posts: 53

Rep: Reputation: 15
I don't know about git but to specify a proxy with authentication you use (protocol://usernameassword@adressort) eg http://admin:root123@192.168.0.5:8080
 
Old 04-14-2006, 09:21 PM   #3
anupamsr
Member
 
Registered: Sep 2004
Location: India
Distribution: Kubuntu, Archlinux, Suse, Gentoo, Mandrake
Posts: 371

Original Poster
Rep: Reputation: 30
Sorry, but I want to run git specifically. I have already specified http_proxy variable
 
Old 03-18-2009, 09:04 PM   #4
ameyp
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Rep: Reputation: 0
[Solved]

I found the instructions on some page.
I've pasted them here for easier access.

Basically the steps are:
1 - sudo apt-get install socket
2 - in your home directory, put a shell script called "proxy-cmd.sh"
containing (replace YOUR_PROXY and YOUR_PROXY_PORT with your own proxy
parameters):
#! /bin/bash
(echo "CONNECT $1:$2 HTTP/1.0"; echo; cat ) | socket YOUR_PROXY
YOUR_PROXY_PORT | (read a; read a; cat )
3 - chmod +x proxy-cmd.sh
4 - export GIT_PROXY_COMMAND=<PATH TO YOUR SCRIPT>/proxy-cmd.sh

Note: you can export GIT_PROXY_COMMAND in your ~/.bashrc file to make
this permanent

Cheers
 
Old 03-21-2009, 04:52 PM   #5
ameyp
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Rep: Reputation: 0
Doesn't work

When I try this, I get the following error:

Connection Refused: Forbidden
git.worldforge.org[0: 85.214.62.124]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)

Please help
 
Old 07-28-2010, 08:49 AM   #6
maheshkk
LQ Newbie
 
Registered: Jul 2010
Posts: 1

Rep: Reputation: 0
@ameyp your suggestion worked like champ! Thanks!

Note to others: ameyp suggestion works only for git_:_// scheme urls.

Any solution for http_:_// scheme as well?
 
Old 01-16-2012, 08:45 AM   #7
WUAmin
LQ Newbie
 
Registered: Dec 2011
Distribution: Linux Mint
Posts: 2

Rep: Reputation: Disabled
This worked for me !

Set proxy :
Code:
$ git config --global http.proxy http://myproxy.domain.com:1234
Check proxy :
Code:
$ git config --get http.proxy
i found it in here.
 
  


Reply

Tags
git, proxy



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba requires authentication to browse unsecured Windows shares shultzc Linux - Software 10 08-19-2009 05:38 PM
squid proxy authentication satish Linux - Networking 1 01-10-2006 08:36 AM
proxy authentication in mozilla peda Linux - Software 1 10-02-2004 04:25 PM
using postfix to send through a relay server that requires authentication surban99 Linux - Software 1 04-27-2004 06:16 PM
proxy authentication joesbox Programming 1 02-23-2003 10:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration