0

The first time we run hub, it asks for our Github username and password. This is never stored. Instead, hub uses it to create a personal access token that gets saved in your account and then it uses that token for subsequent uses.

Is there a way to achieve the same from a bash script, without registering an application and all that?

This script will be public.

user137369
  • 4,751
  • 5
  • 28
  • 52

1 Answers1

1

without registering an application

Not exactly, since it is part of the oauth workflow.

But from a simple shell, you can store your GitHub username and password in a credential helper like libsecret (Mac) or manager (Windows).

In that case, you won't have to enter said credentials again and you don't have to register anything directly on GitHub.

Community
  • 1
  • 1
VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755
  • “But from a simple shell, you can store your GitHub username and password in a credential helper”. No good, since I wanted to do this as part of setting up a new machine. – user137369 Dec 05 '16 at 13:01