root@ls:~/git-learn/my_shell# git remote -v
origin https://github.com/erhudalao/yson.git (fetch)
origin https://github.com/erhudalao/yson.git (push)
root@ls:~/git-learn/my_shell# git remote add origin https://github.com/erhudalao/yson.git
fatal: remote origin already exists.
root@ls:~/git-learn/my_shell# git remote -v
origin https://github.com/erhudalao/yson.git (fetch)
origin https://github.com/erhudalao/yson.git (push)
root@ls:~/git-learn/my_shell# git push -u origin “master”
Username for ‘https://github.com’: 749851433@qq.com
Password for ‘https://749851433@qq.com@github.com’:
^C
root@ls:~/git-learn/my_shell# git push -u origin “master”
Username for ‘https://github.com’: 749851433@qq.com
Password for ‘https://749851433@qq.com@github.com’:
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/erhudalao/yson.git/’
root@ls:~/git-learn/my_shell# git remote add origin git@github.com:erhudalao/yson.git
fatal: remote origin already exists.
root@ls:~/git-learn/my_shell# ls
hello.sh my_code
root@ls:~/git-learn/my_shell# git remote -v
origin https://github.com/erhudalao/yson.git (fetch)
origin https://github.com/erhudalao/yson.git (push)
root@ls:~/git-learn/my_shell# git push -u origin https://github.com/erhudalao/yson.git
fatal: invalid refspec ‘https://github.com/erhudalao/yson.git’
root@ls:~/git-learn/my_shell# git remote -v
origin https://github.com/erhudalao/yson.git (fetch)
origin https://github.com/erhudalao/yson.git (push)
root@ls:~/git-learn/my_shell# git push -u origin master
Username for ‘https://github.com’: 74985144^H^C
root@ls:~/git-learn/my_shell# git push -u origin master
Username for ‘https://github.com’: 749851433@qq.com
Password for ‘https://749851433@qq.com@github.com’:
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/erhudalao/yson.git/’
root@ls:~/git-learn/my_shell# ssh-keygen -t rsa -b 4096 -C ‘ad@163.com’
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): cat ~/.ssh/id_rsa.pub
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Saving key “cat ~/.ssh/id_rsa.pub” failed: No such file or directory
root@ls:~/git-learn/my_shell# cat ~/.ssh/id_rsa.pub
cat: /root/.ssh/id_rsa.pub: No such file or directory
root@ls:~/git-learn/my_shell# cat ~/.ssh/id_rsa.pub
cat: /root/.ssh/id_rsa.pub: No such file or directory
root@ls:~/git-learn/my_shell# ls
hello.sh my_code
root@ls:~/git-learn/my_shell# ls -al ~/.ssh
total 12
drwx—— 2 root root 4096 Sep 1 17:43 .
drwx—— 5 root root 4096 Sep 1 21:46 ..
-rw——- 1 root root 0 Aug 12 17:45 authorized_keys
-rw-r–r– 1 root root 444 Sep 1 17:43 known_hosts
root@ls:~/git-learn/my_shell# ssh-keygen -t rsa -b 4096 -C ‘163.com’
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): yew
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Passphrases do not match. Try again.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in yew.
Your public key has been saved in yew.pub.
The key fingerprint is:
SHA256:F8OkrLfy3FTUCSJXAxMRnk8K1Y 123@163.com
The key’s randomart image is:
+—[RSA 4096]—-+
| =B%++o |
| o.E+ | | oB.. |
| .+.+.o.. |
| oo+S o+ |
| . o.o.+o. |
| o .o+o. |
| . o o.. |
| .. +. |
+—-[SHA256]—–+
root@ls:~/git-learn/my_shell# ls -al ~/.ssh/
total 12
drwx—— 2 root root 4096 Sep 1 17:43 .
drwx—— 5 root root 4096 Sep 1 21:46 ..
-rw——- 1 root root 0 Aug 12 17:45 authorized_keys
-rw-r–r– 1 root root 444 Sep 1 17:43 known_hosts
root@ls:~/git-learn/my_shell# cat ~/.ssh/id_rsa.pub
cat: /root/.ssh/id_rsa.pub: No such file or directory
root@ls:~/git-learn/my_shell# cat ~/.ssh/yew
cat: /root/.ssh/yew: No such file or directory
root@ls:~/git-learn/my_shell# whereis yew
yew:
root@ls:~/git-learn/my_shell# ls
hello.sh my_code yew yew.pub
root@ls:~/git-learn/my_shell# cat yew.pub
ssh-rsa HoEGK99DAtARl58qi0YNqVlLjZr+LB0MTwpWOa8X+RfasXI8U0YuZtrfEiswZqTHS3iMtBrPlY+9lB1gbkPbVv0CytgoG6IhFD3agyv4ZMnLLGxOC3ck0Hhrat1jicO8ZnMZFt+xLtcKHEPNffC+W7RANLm0ssXv1/Z9IWtS2+KGL0Fsekdx0Rc9jDNL/FBNo1czbFzQaN+PQQXyY+uEXFDbIw1SksbKRFpYLBvQDyUGN4QjzGjr8fSJyYylcHQO1xGUL9Pnj7Ly6K4S83FabJyO1dmabhpi0cTgHONf+GpijXu8OQB5qG2Vxabd6cPiKf9dskGJY8dFOzYd9i87FzudsPA7rVsAmoWUZmX8UtThOm8xs0d/0JHhkhm9eJr0EgmXN09CaUzrY8ZOVCMGl0ash10LsNVnCO6N5hBfykqA8zRHt4zz3dP6q/QQQRBy55iMGWDxjvN2Hs9XfMQmHdSSgX/vYEw+kQ5geAKTwa0r9UkLIY26K6EdML9o8vu7aCEeWEutGw5hsiKMRkPmhpS+YK41gO0qqXedvoXmnTkC98NP51Cxgw== 123@163.com