Coder Social home page Coder Social logo

gitcommand's People

Contributors

qlzhu avatar

Watchers

 avatar  avatar

gitcommand's Issues

生成SSH公钥

  1. 启动 Terminal
  2. 输入 ls -la ~/.ssh 命令检测本地是否已有生成的密钥
  3. 如果没有现有的公钥和私钥对(id_rsa.pub和id_rsa),就使用ssh-keygen程序生成。倘若本地已有的话,就使用cat ~/.ssh/id_rsa.pub命令查看公钥
# 回车后它会要求你输入两次密钥口令。如果你不想在使用密钥时输入口令,将其留空即可
# ssh-keygen 密钥的存储位置(默认是 .ssh/id_rsa)
# -b 指定要创建的密钥的位数
ssh-keygen -t rsa -b 4096 -C "[email protected]"

# 不指定也没事
ssh-keygen -t rsa -C "[email protected]"
  1. 获得公钥id_rsa.pub后,把内容粘贴到 Github 上的 Settings -> SSH and GPG keys -> New SSH key 内
  2. 测试SSH连接
ssh -T [email protected]

# 如果看到如下内容就说明成功了
# Hi Username! You've successfully authenticated, but GitHub does not provide shell access.

相关资料
Github帮助信息
Git scm官网关于SSH生成 公钥部分

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.