I just created a GitLab account, I signed up by using the "Using google" option, and it just prompted me for my gmail credentials. The email in question is a company email I was given by my administrators.
When I wanted to use these credentials in Visual Studio, it asked me with this screen for my credentials:

I entered my company email and its password, but I received this error from Visual Studio:
Fetching from origin
Remote: HTTP Basic: Access denied
Error encountered while fetching: Git failed with a fatal error.
Authentication failed for 'https://gitlab.com/xxxxxxx/xxxxx/xxxxxxx.git/
I wanted to make sure the credentials were properly set, so I went to gitlab page and signed out. When trying to sign in, same thing happens. I am allowed to sign in to gitlab if I use "Using google" option, but not via email password.
Is this a problem?, do you know any workaround I could use to sing into my gitlab account within Visual Studio?
CodePudding user response:
When you created your account, it's bound to your google credentials. You can see it's connected by clicking on your profile icon in the upper right corner and clicking "Preferences > Account". Under Social Sign-in, you'll see that the google button now shows "Disconnect Google". When you do this, GitLab does not assign you a username by default (honestly, it may now, but it didn't when I created my account several years ago). However, you can change your username on that same "Preferences > Account" page under the "Change username" heading, so go ahead and assign yourself one if you don't have one there. If you already have one, go ahead and take note of that.
Once you have your username, you can likely authenticate using an access token instead of a password. Create an access token under "Preferences > Access Token" and assign the privileges you want depending on what you are going to do with VS.
If you really want to use a password instead (or if the VS plugin doesn't work with an access token), you can set a password under "Preferences > Password", and use that instead.
Hopefully this helps!
CodePudding user response:
Result
Use this token as password for you enter to the form what you seen.



