seveas / git-spindle

Abandoned command-line interface to GitHub and other central git services
Other
172 stars 35 forks source link

Use git-credential to store sensitive information #161

Closed mattiasb closed 7 years ago

mattiasb commented 7 years ago

Currently git-spindle stores its session token and username as plain text inside .gitspindle. I think it would be neat if git-spindle used the git-credential interface instead. That way the user can choose to store the data in plaintext by using git-credential-store or something more secure (there's backends for Linux-, MacOS- and Windows keyrings as well as lastpass.com for example).

An example of manually using git credential:

echo -e "protocol=https\nhost=gitlab.com\n" | git credential fill
protocol=https
host=gitlab.com
username=mattiasb
password=****************

git-credential could obviously be used both when adding an account and when reusing the token. I already had gitlab.com in my unlocked keyring for example so there's really no reason why I should have to type my username and password again when adding the account.

seveas commented 7 years ago

It's been doing this for exactly 2 years already :) 9bd94ec895c981d42eed61950a140bc3f8f257cb

mattiasb commented 7 years ago

OMG! Im sorry haha! That is awesome!