使用https协议提交仓库

关注微信公众号塔容万物

这篇文章是在https://zhuanlan.zhihu.com/p/521340971 看到的,在linux上亲测可用

  1. 编辑~/.ssh/config文件
vim ~/.ssh/config

# 添加以下内容
Host github.com
    HostName ssh.github.com
    Port 443
  1. 验证是否成功
ssh -T git@github.com

# 成功的话会出现以下内容
Hi dwpeng! You've successfully authenticated, but GitHub does not provide shell access.

ssh教程 https://wangdoc.com/ssh/basic