vscode remote-ssh 远程连接Centos服务器无法拉取GitHub代码问题
先看下能不能访问 github
ping github.com
如不能访问需要配置 host,访问网址:https://www.ipaddress.com/,查找github最新的ip地址,进行hosts配置
140.82.114.4 github.com
199.232.69.194 github.global.ssl.fastly.net
重启host
/etc/init.d/network restart
# ipconfig/flushdns # windows
拉取代码时报错
fatal: remote error:
The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
需要手动关闭ssl验证
git config --global http.sslverify false
提交代码需要配置账号信息
git config --global user.name "xxx"
git config --global user.email "xxx@gmail.com"
配置ssh-key私钥
添加ssh-key私钥到 ssh-agent,首先确保ssh-agent 正常工作,结果类似:Agent pid 94457 即为正常
eval $(ssh-agent -s)
登录 GitHub 找到 setting SSH 配置复制私钥到 /root/.ssh/id_rsa.pub
vim /root/.ssh/id_rsa.pub
本文来自博客园,作者:weichangk,转载请注明原文链接:https://www.cnblogs.com/weichangk/p/16020361.html
分类:
vscode
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix