Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Manually Assign a GitLab Project (VSCode)

I want to use the GitLab VS Code Extension with a private project.

I added my account, generated the token and saved it in VsCode.

When I click on the extension I can see the name of my project but it's marked as "no gitLab project".

When I right click on it, I can select "Manually Assign a GitLab Project" and then I have a textbox to fill. I tried with the local path of my project (where the .git file is), I tried with the link I use in the browser to get to my project and the link I use to clone it, but I always get "Cannot find project with path ..."

What's the right way of setting my project?

like image 901
Ivan Avatar asked Dec 18 '25 05:12

Ivan


2 Answers

You can sign out and sign back in by clicking the Profile icon on the bottom left corner. It worked for me

like image 63
O_Khan Avatar answered Dec 20 '25 03:12

O_Khan


I had the same issue tyring to connect with , I have linked vsCode to GitLab with following steps:

  1. On vsCode CMD + P , type: > Gitlab: Add Account to VS Code enter image description here
  2. Add URL to Gitlab instance: it is not necessarily https://gitlab.com, it could be something different, like for example https://gitlab.company-name.com/ (IMPORTANT to put the right link) enter image description here
  3. Paste your GitLab personal Access Token enter image description here
  4. In case you do not have an access token yet, just go here https://gitlab.com/-/profile/personal_access_tokens or https://gitlab.xxxxx.com/-/profile/personal_access_tokens and create new access token, you just need api & api_user that's the default, you can add more premissions if you need, put the expiration time to next month, year or whatever date in the future

enter image description here

Then you suppose to see the project(s) in your gitlab account on vscode.

like image 29
sqoor Avatar answered Dec 20 '25 04:12

sqoor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!