ubuntu 20.04 访问github很慢

纯净搜索 为您找到 本页 3 条,用时 0 秒(数据源:360)

AI 回答 由 glm-4-flash 生成 · 仅供参考,请自行核实
1. 使用SSH协议访问GitHub
2. 设置SSH密钥
3. 使用代理服务器

代码示例:

生成SSH密钥
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
添加SSH密钥到GitHub账户
ssh-add ~/.ssh/id_rsa
配置SSH代理
cat << EOF >> ~/.ssh/config
Host github.com
HostName github.com
User git
Port 22
ProxyCommand nc -x 127.0.0.1:7890 %h %p
EOF