Skip to content
This repository has been archived by the owner on Feb 10, 2024. It is now read-only.

Auto-run gh auth setup-git on profile switch #30

Open
jhmaster2000 opened this issue Jun 2, 2023 · 0 comments
Open

Auto-run gh auth setup-git on profile switch #30

jhmaster2000 opened this issue Jun 2, 2023 · 0 comments

Comments

@jhmaster2000
Copy link

The issue cli/cli#6096 severely reduces the usefulness of gh-profile since the profile switch command doesn't update the user.{name,email} fields. The linked issue already has a PR waiting to merge: cli/cli#6643.

Once that is merged gh-profile should be fixable with little effort by simply adding the following steps to profile switch:

  1. After the switch, run git config --unset user.name and git config --unset user.email *
  2. Run gh auth setup-git

* According to cli/cli#6096 (comment), it may be implemented in such a way that it won't set the values if they're already set, hence unsetting them first may be necessary.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant