sublimehq / sublime_merge

Issue tracker for Sublime Merge
https://www.sublimemerge.com
274 stars 14 forks source link

Credentials Vault + Set the credential username for a particular repository #1816

Open shammishailaj opened 1 year ago

shammishailaj commented 1 year ago

Problem description

When using multiple Github/Bitbucket/Other service providers accounts to access various repositories, Sublime Merge gets confused.

Preferred solution

A simple command like:

git config --local credential.username "awesomeuser" 

can help alleviate this issue. I think the same should be facilitated by Sublime Merge easily via the GUI. Also, Sublime Merge should be able to store credentials in its own vault and when pushing/pulling, should allow choosing the credential that can be used to perform the operation.

Ideally, we would expect Sublime Merge to provide a feature by the name of creds vault or anything else you want. Once a credential is saved, the same should be available to perform operations on a repository. For this sublime merge should keep a map of data that helps resolve credentials and repository linkages.

dpjohnst commented 11 months ago

Hi @shammishailaj,

Thanks for reaching out and sharing this feedback. Could you elaborate on Sublime Merge getting confused? For example, are the remote git operations failing entirely? Do you see any error messages from Git?

Additionally, could you confirm what platform you are on?

Thanks, - Dylan from Sublime HQ

shammishailaj commented 11 months ago

Hi Dylan (@dpjohnst)

What I mean by "confused" is that it was using a stored credential for wrong repository. I had repositories set-up using multiple github accounts. I stored the credentials for one of my accounts and then when I did a pull on another repository, it used the saved-up credential and as the credential was for another github account the Pull operation failed.