Languages
[Edit]
EN

Bash - clone git repository providing username and password directly when running (as command option or in URL)

9 points
Created by:
elmer
646

In this short article, we would like to show how to clone git repository providing username and password when running using Bash.

Quick solution:

Hint: do not forget to encode username and password when they contains URLs special characters. 

 

Possible cases

Edit

password is optional in URL syntax, so by using:

we will be asked to type password while command is executed.

 

Practical example

Edit

In practice username and password should be encoded. In this section you can find JavaScript's encodeURIComponent() function equivalent.

 

See also

Edit
  1. Bash - JavaScript encodeURIComponent equivalent

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join