1

There are many questions already on SO about the use of git/github with multiple users, mostly focused on a single developer having multiple accounts for different repositories.

In that case, the solution is simple - local config files with different user fields.

I have a repository with multiple allowed accounts (one per developer) and when working from individual machines, this is fine.

One machine is used for deployment and sometimes the users of the machine want to make changes and push to the (github located) git repository.

What is the best way to associate the current user/developer on the machine to their account?

At present, the github credentials always reflect my account, but I might not be the only person making commits from that computer in the future.

chrisb2244
  • 2,940
  • 22
  • 44
  • 3
    Stop developing on a build box. Seriously, just stop. There are so many problems with this... I'm assuming you're on Windows? – Joe Phillips Dec 17 '17 at 05:03
  • Yes - Windows. Re build-box, the source code are binary files that execute in the development environment (you can build exe files, but so far it hasn't been necessary for us). Deploying an exe or for example a zipped package would make minor edits much more tedious (although perhaps you'd argue that's still better) and since the code is held in a private repository cloning without an account registered is impossible. Instructing people not to make changes is fine, but not really an effective control method and a significant slowdown for small things, e.g. changing graph colours or similar. – chrisb2244 Dec 17 '17 at 06:44

1 Answers1

0

If you're only making small changes you can always edit files using Github's web interface. Alternatively you could have each developer keep a passphrase protected SSH key on the machine and do something like this.

corym
  • 382
  • 1
  • 4
  • 14
  • I'll take a closer look at the link - unfortunately I can't make edits online because the source files are binary. – chrisb2244 Dec 17 '17 at 06:45
  • If you use Pageant or something for ssh keys, I've seen problems happen where one user accidentally commits using a different user's key. It's weird and I would avoid it – Joe Phillips Dec 17 '17 at 21:27