在vscode(idea)使用GitHub账号、Copilot异常

在idea使用GitHub账号、Copilot异常

登录GitHub显示

c 复制代码
Invalid authentication data.Connection refused: connect

或者副驾驶显示

c 复制代码
Failed to initiate the GitHub login process. Please try again.

一般网上的方法推荐使用token登录,或者降级副驾驶

经过研究,其实就是DNS污染

修改hosts(C:\Windows\System32\drivers\etc\hosts),添加以下参数。ipaddress.com可以最新查询地址
一定要添加api.github.com
必须添加api.github.com的ip

c 复制代码
# Github
140.82.114.3 github.com
199.232.69.194 github.global.ssl.fastly.net
140.82.114.5 api.github.com

之后cmd登陆

c 复制代码
ipconfig /flushdns

当浏览器可以裸连github.com,表示dns刷新成功,这样所有问题都解决了。

host设置

其中hosts 设置详细可以参看
https://github.com/521xueweihan/GitHub520

相关推荐
鸡啄米的时光机7 小时前
vscode的一些实用操作
vscode·学习
逛逛GitHub11 小时前
刚刚!Open AI 宣布开源?
github
灰色人生qwer11 小时前
React + TypeScript+ Vite 配置路径别名和vscode智能路径提示
vscode·react.js·typescript
莲动渔舟11 小时前
赶AI大潮:在VSCode中使用DeepSeek及近百种模型的极简方法
ide·人工智能·vscode·deepseek
PowerBI学谦12 小时前
Copilot:Excel中的Python高级分析来了
python·excel·copilot
咩咩大主教12 小时前
VSCode运行Go程序报错:Unable to process `evaluate`: debuggee is running
开发语言·ide·vscode·golang·编辑器
佛曰我不想说话13 小时前
通过VSCode直接连接使用 GPT的编程助手
ide·vscode·copilot
不是伍壹14 小时前
【R语言】GitHub Copilot安装-待解决
github·copilot
虾饺爱下棋14 小时前
pycharm上传github问题:rejected
人工智能·深度学习·github
鸠摩智首席音效师14 小时前
如何在 GitHub 中创建一个空目录 ?
github