Created
March 14, 2022 17:20
-
-
Save clly/9e014d10e6786047a861c76a572fbd56 to your computer and use it in GitHub Desktop.
Managing and retrieving credentials using git-credential-manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Retrieving credentials | |
(echo protocol=https; echo url=https://clly@github.com; echo host=github.com) | git-credential-manager-core get | |
# OR | |
(echo url=https://clly@github.com) | git credential fill | |
## To replace credentials use the INPUT/OUTPUT format in git-credentials[1]: https://git-scm.com/docs/git-credential#IOFMT | |
cat <<EOF | git-credential-manager-core store | |
protocol=https | |
host=github.com | |
username=foobar | |
password=hunter12 # (this should be a Personal Access Token) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment