Blog
  • README
  • Daily-life
    • 关于简历
    • 如何做好劳逸结合
    • 探索历程
    • 如何走出个人舒适圈
    • 怎样提升领导能力
    • 个人装换机之 Windows 系列
    • 工作之余 - 技能修炼
    • Search: 业余的专业搜索技能
    • 自我迭代
    • 优秀的自我介绍很重要
    • 工作心得
  • Checklist
    • 开发自检清单
    • 代码教鞭:不值得犯第二次的错
  • Docs
    • Bash: 入门重点
    • CSS 特殊用法
    • ChatGPT 使用总结
    • Console
    • Corn 表达式
    • DOS command
    • Emoji: 供日常学习、查询及使用
    • Git 命令集
    • GitBook
    • Github Action
    • Github
    • HTTP: 小知识巧总结
    • JS 精选
    • Jest learning manual
    • License: 解说
    • Mac
    • Markdown
    • 小程序
    • NPM and Plugin Guide
    • 渐进式 Web 应用(PWA)
    • Regexp
    • Rollup
    • SEO
    • SQL
    • 专业名词
    • Testing
    • TypeScript
    • Vue - fragment knowledge
    • Web API
    • 站点:那些可以经常逛逛的开发工具网站
    • Webpack
    • Windows 之路遇精彩
  • Project
    • README 模板:Project Name
    • 借鉴-项目规范
  • React
    • Antd typescript
    • React: 总结整理
    • React Hook - 速览
    • React-生命周期方法转 Hooks-1
    • React: 生命周期方法转 Hooks-2
    • Redux
    • React router
    • useEffect
  • Share
    • StartToGit
    • 3步自动同步你的 Github 仓库到 Gitee 仓库
    • 软考高级“信息系统项目管理师”考试忠告
    • 轻松使用WebWorker,解放耗时较大的算法代码
  • Tool
    • 最好的工具: 理解并使用那些耳目一新的巧工具
    • IntelliJ IDEA
    • VS Code:发挥应有的效率
  • Office
    • Excel 常用操作
    • Word: 文档操作精选技巧
由 GitBook 提供支持
在本页
  • Steps
  • History log
  • Problems

这有帮助吗?

  1. Share

StartToGit

上一页useEffect下一页3步自动同步你的 Github 仓库到 Gitee 仓库

最后更新于3年前

这有帮助吗?

Steps

  1. & Install Git

    • 关于 SSH

    • 检查现有的 SSH 密钥

    • 生成新的 SSH 密钥并添加到 ssh-agent

    • 新增 SSH 密钥到 GitHub 账户

    • 测试 SSH 连接

    • 使用 SSH 密钥密码

  2. Clone repo 并测试提交改动,验证提交通过,无需输入账号密码

    • modify file

    • git add .

    • git commit -m ""

    • git push

History log

Guo@Guo-PC MINGW64 ~/Desktop
$ ls -al ~/.ssh
ls: cannot access '/c/Users/Guo/.ssh': No such file or directory

Guo@Guo-PC MINGW64 ~/Desktop
$ ssh-keygen -t ed25519 -C "gyx8899@126.com"
Generating public/private ed25519 key pair.
Enter file in which to save the key (/c/Users/Guo/.ssh/id_ed25519):
Created directory '/c/Users/Guo/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/Guo/.ssh/id_ed25519
Your public key has been saved in /c/Users/Guo/.ssh/id_ed25519.pub
The key fingerprint is:
SHA256:******************************************** gyx8899@126.com
The key's randomart image is:
+--[ED25519 256]--+
|           ******|
|          *******|
|         ********|
|         ********|
|        *********|
|        *********|
|         ********|
|              ***|
|               **|
+----[SHA256]-----+

Guo@Guo-PC MINGW64 ~/Desktop
$ eval 'ssh-agent -s'
SSH_AUTH_SOCK=/tmp/ssh-tLCshDnx4NI5/agent.784; export SSH_AUTH_SOCK;
SSH_AGENT_PID=785; export SSH_AGENT_PID;
echo Agent pid 785;

Guo@Guo-PC MINGW64 ~/Desktop
$ ssh-add ~/.ssh/id_ed25519
Could not open a connection to your authentication agent.

# Check and confirm Github client has been installed

Guo@Guo-PC MINGW64 ~/Desktop
$ ssh-add ~/.ssh/id_ed25519
Identity added: /c/Users/Guo/.ssh/id_ed25519 (gyx8899@126.com)

Guo@Guo-PC MINGW64 ~/Desktop
$ clip < ~/.ssh/id_ed25519.pub

Guo@Guo-PC MINGW64 ~/Desktop
$ ssh -T git@github.com
The authenticity of host 'github.com (52.74.223.119)' can't be established.
RSA key fingerprint is SHA256:*******************************************.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com,52.74.223.119' (RSA) to the list of known hosts.
Hi gyx8899! You've successfully authenticated, but GitHub does not provide shell access.

Problems

  • Could not open a connection to your authentication agent.

# Start ssh-agent fix auth issue
ssh-agent bash
Download
Download Github Desktop
使用 SSH 连接到 GitHub