Search code examples
gitgithubgit-clone

What if I am trying to clone github private repository over https protocol and my password contains @ character in it?


I have a private github repository and i can clone the repository by making https request only. SSH is not an option for me. My command should be like this:

git clone https://username:[email protected]/asrrepo/QA.git

But what if my password starts with @ character in it?

git clone https://username:@[email protected]/asrrepo/QA.git

I don't want it to prompt me to enter the password.


Solution

  • you can run
    git clone https://[email protected]/asrrepo/QA.git it will prompt for your password

    Update: (if you don't want it to be prompted) https://username:%[email protected]/asrrepo/QA.git