Search code examples
githttp-authentication

Using @ character on http auth for git pull


I need to run this command:

git pull "https://user:password@bitbucket.com/user/repo.git" master

My problem, the password include the @ character, and I end with an error like: "host asd@bitbucket.com couldn't found" where "asd" is the last part of the password.

How can I get around this?

Note: I know the security issues about this method.


Solution

  • Try to encode @-symbol like this %40 (Percent-encoding)