Skip to content
On this page

github ssh 设置


标签:git/conf  

生成 id_rsa.pub

bash
ssh-keygen -o -t rsa

读取id_rsa.pub

bash
cat ~/.ssh/id_rsa.pub

粘贴到 SSH and GPG keys (github.com)

克隆私有仓库:

bash
git clone [email protected]:Cyang39/repo.git
git remote add master [email protected]:Cyang39/repo.git

仓库的地址不能使用 http url,可以从仓库右上角选择 Code > SSH 复制粘贴,其实格式也很好记:[email protected]:<user>/<repo>.git

Last updated: