I want push my branch onto my github account. I have created ssh key, so I can connect via ssh:
rkukushkin@krv76-home:~/qtprojects$ ssh [email protected]
PTY allocation request failed on channel 0
Hi krv76! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
but when I'm trying git push I got the following:
rkukushkin@krv76-home:~/qtprojects$ git push origin master
Username for 'https://github.com': krv76
Password for 'https://[email protected]':
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/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/krv76/signal.git/'
I expect connection without checking my username and password.
What I'm forget or what I'm doing wrong?
You need to set the remote URL to use the ssh protocol, not the https protocol.
When you go to GitHub, the "Code" button lets you pick the protocol: choose "SSH" (snapshot arbitrarily taken from the git-reference repo):

When you clone your repo, use that URL in the first place. But since you've already cloned with https, you can change the remote url now like this (guessing your URL from your error log):
git remote set-url origin [email protected]:krv76/signal.git
The git remote -v command will display the URL of the repository hosting your code.
To connect to the remote via ssh your URL should be of the form
[email protected]:krv76/catboost.git.
You can use git remote add to add a new remote or the various sub-commands of git remote to play around with remotes that your local clone is aware.
Documentation on git-remote.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With