0

I'm using a self-hosted GitLab instance deployed for the company, along with Visual Studio Code.

I downloaded the extension "GitLab Workflow" in Visual Studio Code, so I can see my GitLab projects hosted in the company instance.

During setup, I entered:

  • The company GitLab instance URL "https://XXXXXXXXXXXXXXXXXXXXXXXXXX"
  • The PAT (personal access token) related to my personal space that contains all my projects.

I also entered the below URL in the configuration file of Visual Studio Code: SettingsExtensionsGitlab WorkflowInstance URL as described in this article, section: Setup / Step 2:

 {
     "window.zoomLevel": -1,
     "workbench.colorTheme": "Visual Studio Dark",
     "terminal.integrated.shell.windows": "C:\\windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
     "gitlab.instanceUrl": "https://XXXXXXXXXXXXXXXXXXXXXXXXXX"
 }

But when trying to see my GitLab projects from VS Code, I get this error message:

 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)
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
CloudRock
  • 159
  • 2
  • 5
  • 14

3 Answers3

2

It sounds like the extension doesn't know what remote to fetch from GitLab (a configuration issue rather than connection). Try adding this to your settings.json file:

"gitlab.remoteName": "origin",

If you use a different remote name, then replace "origin" with your remote. You can see the details of your remote using Git:

git remote

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Adam Marshall
  • 6,369
  • 1
  • 29
  • 45
2

Visual Studio Code includes native capability to connect with GitLab.

At "Start", click on "clone repository" and then paste the target URL at the navigation bar:

See this picture please

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
CloudRock
  • 159
  • 2
  • 5
  • 14
0

I found this answer on their docs, if you already using Windows you should turn off your http.systemCertificates in VSC setting.json

enter image description here

thanks to this answer here

Hamed
  • 317
  • 1
  • 8