Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I need to escape the @ that use the password because it is confused with the host.

Example 1: git clone https://user:p@ssword@github.com/user/repo.git

When I run the above example, it's wrong, because as the password has @ he understands that the next parameter is the host. tried to escape with or you can use the url between "" but it was not.

Example 2: (echo user; echo p@ssword) | git clone https://github.com/usuario/repo.git

When I use only the command,git clone https://github.com/usuario/repo.git he asks the User and Password, so I used the above command, which is the same that I use to change the root password on a line only.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.6k views
Welcome To Ask or Share your Answers For Others

1 Answer

I think what you are looking is to escape the special character @, which you can use encode %40 instead of @. This link might help Escape @ character in git proxy password


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...