Git Clone Using Https Is Not Working, but Works with Help of Ssh

Git Clone Using Https Is Not Working, but Works with Help of Ssh

Git clone using https is not working on my mac machine, getting following error :

akshaybandivadekar@Akshays-MacBook-Pro codebase % git clone 
Cloning into 'lodash'...
: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

But using ssh it works

git clone :lodash/lodash.git

I have referred this document for ssh key setup:

1 Answer

This resolve my problem

git config --global url.":".insteadOf ""

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Marcus Vance
Author

Marcus Vance

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.