I'm trying to clone a GitHub repo in my personal Linux laptop by typing the following command on the command line: git clone https://github.com/my_user/my_project.git, but I'm getting this response:
Cloning into 'my_project'...
Username for 'https://github.com': my_user
Password for 'https://[email protected]':
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/my_user/my_project.git/'
I have already executed this step to check for existent SSH Keys, and the only one is the one I created following this procedure.
This is the content of my ~/.ssh/config:
Host github.com
Hostname github.com
IdentityFile ~/.ssh/my-key
I already added the new SSH Key to GitHub Account following this procedure.
The problem is when I'm trying to test SSH connection by following this procedure, I'm getting this response: Hi my_user! You've successfully authenticated, but GitHub does not provide shell access.
I found this answer to a similar question, but when I try git remote set-url origin [email protected]:my_user/my_project.git I get this error: error: No such remote 'origin' which I understand since I'm still trying to clone the project.
I have tried several recommendations found online, but all of them are for repositories already in the local, which is not my case.
git clonecommand you are using? Are you using the one that github itself offers in the UI? It should look something like[email protected]:username/reponame.git.User gitin your ssh config.