Toggle navigation
主页
English
K8S
Golang
Guitar
About Me
归档
标签
Welcome to Sanger's Blog!
git配置密钥
无
2023-05-18 10:11:04
8
0
0
sanger
## Git 仓库访问地址 http://gogs.xxx.xxx ## 生成Key 敲入命令一路回车 > ssh-keygen 会在 $HOME/.ssh/下生成 id_rsa 和 id_rsa.pub 文件 ## 配置本地git $HOME/.ssh/config ``` Host gogs.xxx.xxx HostName 192.168.1.123 User git Port 10000 IdentitiesOnly yes IdentityFile ~/.ssh/id_rsa ``` ## 配置Git仓库 >用户设置 -> SSH密钥 -> 增加密钥 复制 id_rsa.pub的内容到密钥内容部分 ## 测试 > ssh -T git@gogs.miz.so 提示如下则为成功 ``` Hi there, You've successfully authenticated, but Gogs does not provide shell access. If this is unexpected, please log in with password and setup Gogs under another user. ``` ## 参考 https://help.github.com/articles/connecting-to-github-with-ssh/
上一篇:
git常用命令
下一篇:
WSL问题
0
赞
8 人读过
新浪微博
微信
更多分享
腾讯微博
QQ空间
人人网
文档导航