11

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://me@domain.com@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.

Community
  • 1
  • 1
petrbel
  • 2,534
  • 4
  • 25
  • 44
  • 2
    Possible duplicate of [Escape @ character in git proxy password](http://stackoverflow.com/questions/6172719/escape-character-in-git-proxy-password) – erikvimz May 20 '16 at 09:25

1 Answers1

18

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

http://me%40domain.com@myrepo.git
kan
  • 27,155
  • 7
  • 67
  • 99