Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Escape @ character in git proxy password

Tags:

git

msysgit

I have git proxy config as 'http.proxy=http://userId:pwd@123@ipaddress:port' but while cloning a remote project, I'm getting error as

Cloning into git... error: Couldn't resolve proxy '123@ipaddress' while accessing http://git.kernel.org/pub/scm/git/git.git/info/refs  fatal: HTTP request failed 

How to escape the '@' character in password?

Pls note: I cannot change the password.

like image 896
Karthik Avatar asked May 30 '11 05:05

Karthik


People also ask

How do I escape a special character in git?

When you want one of those “special characters” to be literally printed, that's called character escaping. To escape a character, simply add a backslash ( \ ) before it.

How do I get git to stop asking for password?

You can avoid being prompted for your password by configuring Git to cache your credentials for you. Once you've configured credential caching, Git automatically uses your cached personal access token when you pull or push a repository using HTTPS.

How do I change my proxy settings in Git?

Setting the proxy for Gitgit config --global --add http. proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT. git config --global --add https. proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT.

How do I clone a git repository without username and password?

One way to clone a repository without having to enter your password would be to create an app-password and use it while cloning. That done, git won't prompt for user name and password. Mind that this is a URL and needs to be encoded as an URL then. This will leave the password in the git configuration.


1 Answers

I'd try using the URL Encoded value of the @ symbol (%40) if you're passing the password in the proxy url:

http.proxy=http://userId:pwd%40123@ipaddress:port 
like image 150
John Weldon Avatar answered Oct 15 '22 10:10

John Weldon