|
-
Feb 20th, 2022, 12:38 PM
#1
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?
My usual boring signature: Nothing
 
-
Feb 20th, 2022, 12:52 PM
#2
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.
-
Feb 20th, 2022, 06:41 PM
#3
Re: Multiple Source Control Conundrum
Yeah, that should work...and yeah, that's a sledgehammer solution.
My usual boring signature: Nothing
 
-
Feb 20th, 2022, 09:27 PM
#4
Re: Multiple Source Control Conundrum
 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?
-
Feb 21st, 2022, 06:01 PM
#5
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.
My usual boring signature: Nothing
 
-
Feb 22nd, 2022, 04:19 AM
#6
Re: Multiple Source Control Conundrum
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?
All advice is offered in good faith only. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
Feb 22nd, 2022, 11:46 AM
#7
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.
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|