Sublime Forum

How to Set User Per Repository

#1

I have repositories on GitHub which belong to different log in’s (Private / Academy / Work).
On SmartGit I can set the user (Email for commit, Authentication) per repository.

Is there a way to have settings per repository on SublimeMerge? Specifically the user used for authentication vs. GitHub.

0 Likes

#2

Hi @Royi,

Thanks for sharing this question!

In terms of Git user details (used to sign commits etc), you can set this either globally or per-repository by clicking the user details below the commit message input:

In terms of your authentication credentials, this is generally left up to Git. I know in the case of GitHub, you can append your username to the remote URL to handle different users:

For example:
https://dpjohnst@github.com/sublimehq/Packages.git
instead of
https://github.com/sublimehq/Packages.git

You can update the remote URL in Sublime Merge via the context menu of the remote in the Locations bar.

Hope this helps!
- Dylan from Sublime HQ

0 Likes

#3

I think that since they require tokens you can no longer embed the user name into the repository address. Am I wrong?

0 Likes

#4

Hi @Royi,

I’ve just tested on my end, and it still works as expected with the embedded URL.
When authenticating with the remote repository, you can use your PAT within any password prompts.

Let me know if you’re not seeing this behavior and I’ll take a look into what’s happening :slight_smile:

Cheers,
- Dylan

0 Likes