1

I want configure visual studio code to push change's project to GitLab.
I'm using Linux. Every time that I try do push, show this message to me:

Username for 'https://gitlab.com':

I generated ssh key and put in the GitLab user setting.

Git init, add. and commit works fine.

1 Answer 1

1

I generated ssh key and put in the gitlab user setting.

If Visual Studio is asking about https, that means the remote URL associated with your local Git repo is not an ssh one.


In command-line, go to your repo root folder, and type:

git remote origin set-url [email protected]:<yourAccount>/<yourRepo.git>

That will help Visual Studio Code pick the right URL (the one for which you registered your credentials through your public SSH key)


OR: you might want to keep your current https URL, but cache your GitLab username/password (since you don't want to have to enter them every time).
See "Use Git Credential Managers to Authenticate to Visual Studio Team Services" (it should apply to Visual Studio Code as well, and works on Windows or on Linux)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.