[英]Unable to connect GitLab with Visual Studio Code
我正在使用為公司部署的自托管 GitLab 實例以及 Visual Studio Code。
我在 Visual Studio Code 中下載了擴展“GitLab Workflow”,因此我可以看到我的 GitLab 項目托管在公司實例中。
在設置過程中,我輸入:
我還在Visual Studio Code的配置文件中輸入了下面的URL:設置→擴展→ Gitlab工作流程→實例URL ,如本節所述:
{
"window.zoomLevel": -1,
"workbench.colorTheme": "Visual Studio Dark",
"terminal.integrated.shell.windows": "C:\\windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"gitlab.instanceUrl": "https://XXXXXXXXXXXXXXXXXXXXXXXXXX"
}
但是當試圖從 VS Code 查看我的 GitLab 項目時,我收到以下錯誤消息:
Failed to parse GitLab API response
Command failed with exit code 128: git ls-remote --get-url
fatal: No remote configured to list refs from.
Error: Command failed with exit code 128: git ls-remote --get-url
fatal: No remote configured to list refs from.
at makeError (c:\Users\XXXXXXX\.vscode\extensions\gitlab.gitlab-workflow-3.9.0\node_modules\execa\lib\error.js:59:11)
at handlePromise (c:\Users\XXXXXXX\.vscode\extensions\gitlab.gitlab-workflow-3.9.0\node_modules\execa\index.js:114:26)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
聽起來擴展不知道從 GitLab 獲取什么遠程(配置問題而不是連接)。 嘗試將此添加到您的settings.json
文件中:
"gitlab.remoteName": "origin",
如果您使用不同的遙控器名稱,請將“origin”替換為您的遙控器。 您可以使用 Git 查看遙控器的詳細信息:
git remote
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.