Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find way to change my identity #853

Closed
purplefishies opened this issue Mar 25, 2015 · 2 comments
Closed

Can't find way to change my identity #853

purplefishies opened this issue Mar 25, 2015 · 2 comments

Comments

@purplefishies
Copy link

If I use a single computer to commit as two different people to two different GitHub accounts, I can do this by changing my email identity using

git config --local --set user.email=newuser@newsite.com

Then I can commit this code and after doing the whole remote add , then I can push to a GitHub repo as this different email user.

I cannot do this using hub however because if I perform a

hub  create NewRepo, 

it uses the USERNAME stored in ~/.config/hub

I can't find a well documented way to fix this using the hub command line tool.

@mislav
Copy link
Owner

mislav commented Sep 27, 2015

Hi @purplefishies. Re-authenticating will be made easier once #225 ships. However, if you want to switch between 2 user accounts, I don't think you'll want to re-authenticate with your username and password every time.

A feature has just landed in master where you can define GITHUB_TOKEN as your environment variable and put your Personal Access Token in there. So when you switch between users, all you have to do is make your script switch out the value of this environment variable. Hub's API requests will be done using that token for the corresponding user and ignore the user config set in ~/.config/hub.

This hasn't been released yet, but just letting you know. Will that be enough?

@mislav
Copy link
Owner

mislav commented Jan 22, 2016

Closing in favor of functionality described in #225. Follow that issue for updates!

@mislav mislav closed this as completed Jan 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants