doy / rbw

unofficial bitwarden cli
https://git.tozt.net/rbw
Other
620 stars 83 forks source link

Add git-credential-helper #41

Closed xPMo closed 2 years ago

xPMo commented 3 years ago

This is a rough implementation of a git credential helper.

Documentation: https://git-scm.com/docs/gitcredentials#_custom_helpers

Comments are welcome.

xPMo commented 3 years ago

Also, as an aside, these kind of scripts are more commonly found in a contrib/ directory. I make a soft recommendation to rename bin/ to contrib/.

xPMo commented 3 years ago

I am okay with setting this aside until #26 is closed. URI matching would allow this script to be much more precise, and probably simpler.

ivankovnatsky commented 2 years ago

i do already use this one: https://gist.github.com/mikeboiko/58ab730afd65bca0a125bc12b6f4670d. i don't know if that covers all the cases, but it does cover mine, i think i was using it couple of months already.

xPMo commented 2 years ago

we can place the file under: contrib/git-credential-rbw

I'd rather not split bin/ and contrib/; if there are scripts in bin/, let's put them all there. Also, on a second pass of git-credential docs, I realize that naming it git-credential-rbw and putting it in $PATH would allow git config credential.helper rbw to work.

ivankovnatsky commented 2 years ago

we can place the file under: contrib/git-credential-rbw

I'd rather not split bin/ and contrib/; if there are scripts in bin/, let's put them all there. Also, on a second pass of git-credential docs, I realize that naming it git-credential-rbw and putting it in $PATH would allow git config credential.helper rbw to work.

i'm fine with either way, it's just that bin/ directory sounds more like a part of a project, whereas this script is basically a community related addition, but maybe it's just me.

ivankovnatsky commented 2 years ago

can't test the script in full until: https://github.com/doy/rbw/issues/71, have my git http token config in slightly different format. but i like it, much cleaner than the one i provided as an example.

xPMo commented 2 years ago

i'm fine with either way, it's just that bin/ directory sounds more like a part of a project, whereas this script is basically a community related addition, but maybe it's just me.

Well, the existing scripts in bin/ are already community additions, and I'd call this script more "core" than most of those.

ivankovnatsky commented 2 years ago

looks good, why not convert to ready for review?

doy commented 2 years ago

looks great, thanks!