Sublime Forum

Linux - Two different users in two different repos in Sublime Merge

#1

Hello,

Is there a simple way of using Sublime Merge for two different git users to manage two or more, different repositories. For example a professional user for enterprise repo and a personal user for example for github. Always with the same PC login user.

I didn’t see any options to choose user while doing the first clone.

Thank you,

Best regards,
Joao

0 Likes

#2

Hi @joaocarvalhoopen,

Thanks for reaching out!

You can definitely set up Sublime Merge with two different Git Users.

Steps:

  1. Open a repository you’d like to use as a specific user
  2. Click the git user information below the commit message
  3. Enter the Git user information you’d like to use for this repository
    image
  4. Select Apply to local repository only to ensure this information is saved to this specific repository only
  5. Select Update and continue to use Sublime Merge as usual

Hope this helps!

Kind regards,
- Dylan from Sublime HQ

2 Likes

#3

Hello Dylan,

Thank you,

That takes care of the case when I create a repository in my local computer from scratch and then Push it to a remote git server.

Now I have only to have a way of making the other case that is more common. That is, if I create first the project in the remote git server, and if I have then to have in my local machine the credentials user and email do clone from a particular git server A and from a git server B with two different users from two different git servers. Example one enterprise from a company A and other for private repos for example from GitHub. Both by SSH, because the SSH public key can be the same in both.

Maybe if I clone it in the command line/shell with the specific user and email credentials (to have access to it, other way I don’t have access to it) and then open it in Sublime Merge, it will possibly stay with that user and email, specific to the project.

Note: Maybe for a future version of Sublime Merge, to add two field in the clone to change the user.name and the email, would be great :slight_smile:

Know I just have to research, How to clone a repo with a specific user.name and email, using ssh public key.

I’m really liking this tool, the only problem I’m currently seeing is same craches when I have the mouse is over the files window parte and to some operations, it happen already 3 times in Linux Fedora 36, but I was not able to isolate the problem. To report the bug case. When I isolate the problem I will report it.

The multi user support is the more important thing to me and I think for several developers, because our private users we are attributed randomlly and our enterprise users, normally follow enterprise rules.

Thank you,

Best regards,
Joao

0 Likes

#4

Hi @joaocarvalhoopen,

Am I understanding you correctly that you want to set the Git user.name and user.email fields for a repository you’re cloning? If so, you should be able to set the Git username and email after cloning.

Cloning shouldn’t require Git user credentials (it may require authentication with the remote server but this is separate to Git usernames / emails, usually by providing an ssh passphrase when prompted).

Once you’ve cloned the remote repository, you can simply set the Git username and email as described in the process above.

Cheers,
- Dylan

0 Likes

#5

Hello @djohnston,

Thank you,

I tested the scenario with two users, with the info that you just given me, about the fact that my global user.name and email wasn’t checked in the clone command (git cmd or inside Sublime Merge), and after that, doing a user.name and email change to the correct one, and then doing a push and everything worked correctly as you said it would.

Very nice!

Thank you,

Best regards,
Joao

0 Likes