I am currently learning the HubFlow way of managing versioning and workflow using Git and GitHub.
I created this dummy repository to get some hands-on experience.
I have tried certain commands like
git hf update
I get prompted for my GitHub credentials multiple times.
Here is an example:
macair:learnhubflow simkimsia$ git hf update
Fetching origin
Already on 'master'
From https://github.com/simkimsia/learnhubflow
* branch master -> FETCH_HEAD
Already up-to-date.
Username:
Password:
Everything up-to-date
Switched to branch 'develop'
Your branch is behind 'origin/develop' by 2 commits, and can be fast-forwarded.
From https://github.com/simkimsia/learnhubflow
* branch develop -> FETCH_HEAD
Updating d76bec3..b351907
Fast-forward
IMG_0001-w800-h600.png | Bin 0 -> 192787 bytes
1 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 IMG_0001-w800-h600.png
Username:
Password:
Everything up-to-date
Switched to branch 'master'
Summary of actions:
- Changes from origin/master have been pulled into branch 'master'
- Changes from origin/develop have been pulled into branch 'develop'
- You are now on branch 'master'
Is there a way for me to simply supply the GitHub credentials just once each time I used a HubFlow command?
Use SSH keys+URLs. If you already have an SSH key, add it to your Github account.
If you don’t have an SSH key, Github provides a nice guide walking you through creating a keypair and authorizing your public key.
After you’ve added a public key to Github, you’ll need to change your remotes to use the SSH URLs:
Assuming that this is your
origin, you can make the change with the following command:Now you’ll be authenticated using your keypair instead of needing to type in your password. If you wish, you can set a password for your keypair so that someone who walks up to your unlocked computer can’t push changes as you.