Something went wrong. Try again.
git credential helper to allow you to do http auth git actions
Something went wrong. Try again.
Files
- Go 100%
readme.md
git-credential-tangled #
A git credential helper for pushing to a Tangled knot over HTTPS. For each push it has your PDS mint a short-lived service-auth token from an app password you have saved in your git credentials. Tested on MacOS, but should be pretty cross platform
Install #
go install tangled.org/pds.dad/git-credential-tangled@latest
Use #
Scope it to your knot. The empty helper keeps other helpers from answering for that host:
git config --global credential.https://knot.example.com.helper ""
git config --global --add credential.https://knot.example.com.helper "tangled --handle alice.example.com"
So for example for my knot knot.pds.dad it would be
git config --global credential.https://knot.pds.dad.helper ""
git config --global --add credential.https://knot.pds.dad.helper "tangled --handle pds.dad"
When adding remotes you will need to replace tangled.org with your knot address. So https://tangled.org/pds.dad/git-credential-tangled would become https://knot.pds.dad/git-credential-tangled
Will then ask you for your App Password on first push, will save your app password and refresh token to git credentials
You can set TANGLED_APP_PASSWORD instead as well.