Last active
March 24, 2025 21:11
Revisions
-
maelvls revised this gist
Nov 27, 2020 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -51,4 +51,11 @@ Key: service Value: vscode-insidersvscode.github-authentication Key: xdg:schema Value: org.freedesktop.Secret.Generic ``` To fetch secrets, you can use `secret-tool`: ``` sudo apt install libsecret-tools secret search ``` -
maelvls created this gist
Nov 27, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,54 @@ ## Dealing with secrets GNOME comes with libsecret. You can use libsecret to [store your git credentials](https://askubuntu.com/questions/773455/what-is-the-correct-way-to-use-git-with-gnome-keyring-and-https-repos): ```sh sudo apt install libsecret-1-0 libsecret-1-dev libglib2.0-dev sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret ``` Then, create a personal access token on github/gitlab. Remember that the username does not matter when using a PAT: you can just use `foo` as username. To list the secrets stored, you can use `lssecret`: ```sh git clone https://github.com/gileshuang/lssecret /tmp/lssecret cd /tmp/lssecret make && DESTDIR=/usr/local sudo make install ``` ``` % lssecret Collection: Login Collection: Collection: Default Item: Git: https://gitlab.com Key: protocol Value: https Key: user Value: foo Key: server Value: gitlab.com Key: xdg:schema Value: org.gnome.keyring.NetworkPassword Item: https://some.note.i.created Key: xdg:schema Value: org.gnome.keyring.Note Item: github-pat Key: xdg:schema Value: org.gnome.keyring.Note Item: vscode-insidersvscode.github-authentication/github.auth Key: account Value: github.auth Key: service Value: vscode-insidersvscode.github-authentication Key: xdg:schema Value: org.freedesktop.Secret.Generic ```