我无法从 vscode 访问 github 存储库

I'm not able to access github repository from vscode

我是 Git 的新手:我试图将它与 VSCode 集成,但出现此错误

git clone https://github.com/vijaypatneedi/DS.git f:\VS Code\DSA\DS
Cloning into 'f:\VS Code\DSA\DS'...
fatal: unable to access 'https://github.com/vijaypatneedi/DS.git/': Unsupported proxy syntax in '<proxy-server-url>:<port>'

这似乎不是 VSCode 克隆问题,而是 cURL 问题,例如 winlibs/cURL issue 14

首先检查您是否定义了代理(env|grep -i proxy)。

如上所述,语法可能不正确。


如果这没有链接到代理本身,则取决于您当前安装的 curl 版本。

where curl

可以是:

  • 来自 Windows 10 (C:\Windows\System32\curl.exe)
  • 来自 Git (C:\path\to\Git\mingw64\bin\curl.exe)

尝试在已设置简化路径的 CMD 中启动 VSCode:

set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\cmd;%GH%\mingw64\bin;%PATH%

使用 C:\path\to\git 解压最新 Git PortableGit-2.23.0-64-bit.7z.exe

的文件夹

然后输入:

"%LOCALAPPDATA%\Programs\Microsoft VS Code\bin\code.cmd"