Skip to content
Menu
(◍ ´꒳` ◍)

  • Blog
  • Front Page
(◍ ´꒳` ◍)

github添加ssh

By erhu on 2023年9月1日2023年9月1日

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

Category: 鸿蒙

文章导航

git
git分支

Related Posts

鸿蒙49创建 Data

10月 9, 2021
Read More

鸿蒙53数据库存储

10月 11, 2021
Read More

鸿蒙os01(app deviceConfig)

8月 2, 2021
Read More

发表回复 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注

近期文章

  • 实施002
  • 实施SQL001
  • 泛微oa001-字段
  • 硬件前端-海康威视摄像头
  • 使用Docker搭建Weblogic服务001

近期评论

    归档

    • 2023年10月
    • 2023年9月
    • 2023年8月
    • 2023年5月
    • 2023年4月
    • 2023年3月
    • 2021年11月
    • 2021年10月
    • 2021年9月
    • 2021年8月
    • 2021年5月

    分类

    • C
    • docker
    • iptable
    • ISIS
    • java
    • k8s
    • liunx
    • OpenCV py
    • ospf
    • solr
    • zabbix
    • 劳动法
    • 周杰伦
    • 格林法则
    • 等保
    • 鸿蒙

    其他操作

    • 登录
    • 条目feed
    • 评论feed
    • WordPress.org
    ©2025 (◍ ´꒳` ◍) | WordPress Theme by Superb WordPress Themes