tags:

views:

50

answers:

1

Hi.

I have configured my machine to use one account for a github project for a while now. Now I am going to start participating in another project and decided to use a different github account.

I tried to set the configuration for the new repository locally, but it didn't seem to help:

$ mkdir github
$ cd github/
$ git init
Initialized empty Git repository in /Users/.../Sites/.../github/.git/
$ git config user.name "..."
$ git config user.email "..."
$ git config github.user SECOND ACCOUNT NAME
$ git config github.token SECOND ACCOUNT TOKEN
$ git clone [email protected]:.../....git
Initialized empty Git repository in /Users/.../Sites/.../github/.../.git/
ERROR: Permission to .../... denied to FIRST_ACCOUNT.
fatal: The remote end hung up unexpectedly

Is there something else I need to do?

Thanks!

A: 

You could create another Unix-user to work on that second project, that would minimise complication. Else you would have to change the email-address back and forth (as Github connects the commit and the account by comparing the email-addresses and would thus probably refer to the wrong account in the commit).

To the connection issue: Have you uploaded your SSH key to Github for the second account?

Florian Mayer
Ack, I haven't added the SSH key yet. Is it possible to have two keys? The first account already has it in .ssh/id_rsa and id_rsa.pub...
Chris Butler
It is perfectly possible to have two SSH keys on Github. Head over to “Account Settings”, then click on “SSH Public Keys” and press “Add another key”. Hope that helped!
Florian Mayer