Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to escape special characters in .gitconfig proxy authentication

I'm trying to use git behind a proxy and i have set up the proxy details in the .gitconfig files as follows.

 [http]
     proxy = http://<username>:<password>@<proxy_ip>:<proxy_port>

The problem is that the username and password field contain the '@' character which needs to be escaped.How should it be escaped?

like image 475
bosco- Avatar asked Apr 02 '12 18:04

bosco-


1 Answers

Replacing @ with %40. (as illustrated, for instance, in this bug report)

export http_proxy=http://username%40domain.com:password@host:port
like image 75
VonC Avatar answered Oct 02 '22 02:10

VonC