windows电脑上访问GitHub

799 阅读1分钟

Windows电脑本地配置

1、设置设置GitHub的user name和email

git config --global user.name "smithforest"

git config --global user.email "smithforest@126.com"

2、使用Git Bash,生成一个新的SSH密钥

打开 Git Bash,输入如下命令,然后连续按三个回车即可:

ssh-keygen -t rsa -C "smithforest@126.com"

3、打开指定文件 复制生成的SSH本地密钥

image.png

4、打开github 个人设置

image.png

解决本地代码推送Git仓库443的问题

1、查看软件端口配置 如7890

2、设置Git全局代理

git config --global http.proxy http://127.0.0.1:7890

git config --global https.proxy https://127.0.0.1:7890

3、注意事项

取消全局代理

git config --global --unset http.proxy
git config --global --unset https.proxy