【问题标题】:I'm not able to access github repository from vscode我无法从 vscode 访问 github 存储库
【发布时间】:2019-10-05 16:38:54
【问题描述】:

我是 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>'

【问题讨论】:

  • git clone 的最后一个参数只是目录名,不是完整路径。见documentation

标签: git github visual-studio-code vscode-settings


【解决方案1】:

这似乎不是 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)

尝试在您设置了简化 PATH 的 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"

【讨论】:

    猜你喜欢
    • 2018-02-04
    • 2020-12-21
    • 1970-01-01
    • 2018-09-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-21
    • 2018-11-27
    相关资源
    最近更新 更多