If you want to use git
instead of https
protocol, you need to leverage SSH
keys. otherwise you will encounter following errors:
$ git clone git@xxxxx/xxx.git
Cloning into 'xxx'...
git@xxx's password:
Permission denied, please try again.
If you don’t have SSH
keys, you need to use ssh-keygen
to generate a pair of keys, then copy public key into your account. The following picture shows how to add key in gitlab
(github
is similar):
Reference:
Which remote URL should I use?