2

Intro
I have an http proxy which has an unusual password with '@' in it. I can't change it. I have to connect to only using the proxy, i.e., every software has to use proxy or they don't work.

Situation
I use Ubuntu 16.04.
I have set gnome settings proxy with the user-name and password. I have set /etc/environment file to specify the http proxy. I have separately set apt to use proxy settings.

All the above configurations have something in common, that '@' isn't directly accepted, I had to escape it using %40. To pass the proxy username, password, address and port through terminal, I have to use http://username:password@server:port. The problem arises here, since most softwares get confused when I write password with @ in it. Something like pass@word.

Problem with git
Link to how to make git work with http proxy
I set ~/.gitconf file as below:

  • Case 1:

[http]
         proxy = http://user:pass@word@server:port

  • Case 2:

[http]
         proxy = http://user:pass%40word@server:port

  • Case 3:

[http]
         proxy = http://user:pass%%40word@server:port

All of which did not work.


I used squidman in my friend's macOS Sierra to set parent proxy and set git's proxy to use the port squidman is listening to and git worked.

To replicate the same behavior I installed squid in my Ubuntu 16.04.
I have set squid.conf file as below:

http_port 3128
cache_peer server parent port 0 no-query no-digest login=user:pass%%40word      
#as specified by squid config rules in comments

and set git proxy to

[http]
    proxy = localhost:3128

which still gave me couldn't connect to server

Question
How do I properly set Squid proxy?

My details for proxy are like (they are invariants):
    Username: user
    Password: pass@54321
    Server: 192.25.5.6 //The server is in my network
    Port: 808

How do I make git use of squid's proxy?


References are not necessary but would be extremely helpful.

Community
  • 1
  • 1
Tarun Maganti
  • 3,076
  • 2
  • 35
  • 64

1 Answers1

0

the git config file is called, ".gitconfig", not ".gitconf" as you mentioned in your question. This might be why your settings did not work as expected

rydrman
  • 135
  • 3
  • 7