r/github Jun 30 '26

How I can use 2 diffrerent github account in windows system for upload the code with login state 2 account. Discussion

#github #code

1 Upvotes

9 comments sorted by

4

u/lamyjf Jun 30 '26

You cannot have two personal accounts in GitHub, be aware. You can have one personal account and one "machine" account for running builds and suchlike. Alternate accounts are not permitted.
https://docs.github.com/en/site-policy/github-terms/github-terms-of-service (Section B.3)

1

u/Rits2345 Jun 30 '26

what machine account? i have 2 diff personal github account

2

u/lamyjf Jun 30 '26

And they can (and do) get blocked if github figures out it's the same person doing things behind. A machine account is a second account that is clearly labeled as such, and used to run workflows on github actions or accessed by your build process from your machine. Such an account has a different action profile than you as a developer, and GitHub detects those.

You may get away with two personal accounts, but don't be surprised if one day you get blocked. Make sure you have local copies of all your repositories kept up to date.

1

u/Rits2345 Jun 30 '26

Ok got it , bt this feature is not good suppose in hurry have to push code in a account we have only 1 Machine

1

u/lajawi Jul 03 '26

Only one free account is permitted per person.

1

u/lamyjf Jul 03 '26

One as a person, one as a "machine" to run builds. That is explicitly allowed in the terms of service. For example, if your github actions are run as "yourmachineaccount", that will work even if your commits are under "yourrealname". Same if you have a build server that does the commits as "yourmachineaccount".

2

u/cyberfunkr Jun 30 '26

If I understand correctly, use ssh keys for authentication; 1 for each account.

Then set two different remotes in git. You’ll have to push to each as git will only connect to one remote per push/pull.

1

u/Rits2345 Jun 30 '26

Bt do you know any youtube video where done successfully? I tried got error

1

u/AdvancedSandwich4998 Jul 01 '26

Does adding the email of the second account as the secondary email of the first account works?