Help setting up machine user

I’m not clear on the instructions for how to create a machine user.

I have a Github account with several private repos. I’d like to have two of them on a single server. I log in and manage as a single Unix user, dwayne. Up until I created the second application, I’d just use a deploy key.

Since these can’t be duplicated, I see where it’s recommended to set up a machine user, for example, here:

The repositories are owned by my Github account  “futura.” I do have a separate Github account that I’m not using, “dpurper,” so I’ve set this account as a collaborator. I generated a key on the server and copied it as my SSH key for that user at


Github repo owner: futura
Github collaborator: dpurper
Unix user: dwayne
Github repo names:

I still can’t figure out how to access the repositories from my server. I need to clone the second one, but …

sudo -u dwayne git clone

Gives me:

Cloning into 'beta'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

What am I doing wrong?


Oh, a bit more. I named my key to match the collaborator user, so:

And, then, in ~/.ssh/config:

User dpurper
IdentityFile /home/dwayne/.ssh/dpurper.id_rsa

I assume this is how I’m supposed to identify which key I want to use?

OK, solved it: 

“All connections, including those for remote URLs, must be made as the “git” user. If you try to connect with your GitHub username, it will fail”

So, this works:

sudo -u dwayne git clone