Multiple Source Control Conundrum
I'm using Visual Studio and working with GitLab for source control. However, there is something odd about the way this works. Naturally, you need to supply credentials for getting remote, private, repositories, but those credentials are stored on the Windows level, not the VS level, or the project level. That's a bit of problem for me, because I have two different sets of credentials for GitLab, one for private projects, one for work projects. If the credentials were stored at the project level, this would be no problem, but because they are stored at the Windows level, I have to go into Configuration Manager and wipe out the existing credentials when I swap between personal and work projects. This seems like a poor way to do things.
I haven't actually tried adding a second set of credentials for the same site to Credential Manager, but only because I assumed that wouldn't work. That would be asking a fair amount of Windows and VS.
Is there a better way to handle this?
Re: Multiple Source Control Conundrum
A bit of a sledgehammer suggestion, but if you were to set up a different Windows user on your PC dedicated to your VS use for work projects, then you could have a separate VS shortcut on your desktop that is set to run VS as this other user, and then all of the settings inside VS, including saved Git credentials, would be separate from the settings & stored credentials VS uses for your primary Windows account.
Re: Multiple Source Control Conundrum
Yeah, that should work...and yeah, that's a sledgehammer solution.
Re: Multiple Source Control Conundrum
Quote:
Originally Posted by
Shaggy Hiker
Yeah, that should work...and yeah, that's a sledgehammer solution.
:)
I don't use a current VS nor Git so this is more of a question than a suggestion, but what happens if you don't store credentials at all? Does VS prompt you for them when needed? If so, does that solve your problem or just create new ones?
Re: Multiple Source Control Conundrum
Yes, if the credentials aren't there, VS will prompt you. This would not create any problems, just a bit more work (a login). What I don't know is whether VS can be told to NOT store the credentials. Frankly, I wouldn't use such an option if it were available, since I expect to mostly only be using one login on these computers. If I need to switch, I know what I have to do, and it's a bit annoying, but switching credentials will be somewhat rare. I was just hoping that it wasn't even necessary.
It's an odd choice, really. Perhaps it has to do with security issues, since VS projects are very open (virtually all of the files in a solution are just text files of one format or another), it could be somewhat problematic to store credentials with the project. Still, this seems like a problem that ought to be encountered fairly often.
Re: Multiple Source Control Conundrum
Quote:
because they are stored at the Windows level
Aren't they stored at the user level? What happens if you have multiple users with different credentials and switch between them?
Re: Multiple Source Control Conundrum
You're probably right about that. I would expect that, had I used a different login, I'd have different credentials.