Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git remote url with username in form of email address

Tags:

git

I would like to have my git username saved in remote url address in order not to type it every time I push or pull.

I found many answers (such as this one) which solves the problem. The thing is that my username contains @ since it is (and unfortunatelly must be) an email address.

When I enter http://[email protected]@myrepo.git, the parser is confused and takes only me as the username.

How can I solve it? Is it even posisble? Unfortunatelly, I can't use ssh, to https is the only option.

like image 640
petrbel Avatar asked May 20 '16 09:05

petrbel


1 Answers

Use url-escaping, i.e. replace @ in the username with %40:

http://me%[email protected]
like image 70
kan Avatar answered Oct 18 '22 16:10

kan