Compare commits

...

2 Commits

Author SHA1 Message Date
Aminda Suomalainen ⚧ 770c1ee98e
update README.md for codeberg 2024-08-10 12:39:30 +03:00
Aminda Suomalainen ⚧ 5d882cec3e
update dependencies 2024-08-10 12:38:36 +03:00
8 changed files with 237 additions and 35 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
node_modules/

1
.npmrc Normal file
View File

@ -0,0 +1 @@
manage-package-manager-versions=true

1
.nvmrc Normal file
View File

@ -0,0 +1 @@
lts/*

View File

@ -4,12 +4,14 @@ ci:
# https://github.com/pre-commit-ci/issues/issues/83 # https://github.com/pre-commit-ci/issues/issues/83
autoupdate_schedule: quarterly autoupdate_schedule: quarterly
default_language_version: node: "lts"
python: pypy3 # Remember .python-version !
python: "3.12"
ruby: ".ruby-version"
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0 rev: v4.6.0
hooks: hooks:
- id: check-added-large-files - id: check-added-large-files
- id: check-case-conflict - id: check-case-conflict
@ -29,13 +31,15 @@ repos:
- id: doctoc - id: doctoc
args: [--update-only, --notitle] args: [--update-only, --notitle]
- repo: https://github.com/pre-commit/mirrors-prettier - repo: local
rev: "v3.0.3"
hooks: hooks:
- id: prettier - id: prettier
name: prettier
entry: corepack pnpx prettier --cache --ignore-unknown --write
language: system
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python - repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: "2.7.2" rev: "2.7.3"
hooks: hooks:
- id: editorconfig-checker - id: editorconfig-checker
alias: ec alias: ec

1
.python-version Normal file
View File

@ -0,0 +1 @@
3.12.4

View File

@ -1,9 +1,10 @@
# allowed_signers file for SSH/git # allowed_signers file for SSH/git
Git 2.34 brings support for signing commits with SSH key and having a SSH-compatible Git 2.34 brings support for signing commits with SSH key and having a
smartcard, I have to try this. It likely getting more common in the future doesn't SSH-compatible smartcard, I have to try this. It likely getting more common in
hurt either and I have [pgp-alt-wot](https://gitea.blesmrt.net/Mikaela/pgp-alt-wot) the future doesn't hurt either and I have
which does about the same for PGP. [pgp-alt-wot](https://gitea.blesmrt.net/Mikaela/pgp-alt-wot) which does about
the same for PGP.
<!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
@ -18,52 +19,64 @@ which does about the same for PGP.
## Where to find keys ## Where to find keys
- GitHub, Giteas and GitLabs expose user public keys (without useful names) - GitHub, Giteas and GitLabs expose user public keys (without useful names) when
when you append a `.keys` after their profile page you append a `.keys` after their profile page
- For example: https://github.com/Mikaela.keys https://gitea.blesmrt.net/Mikaela.keys https://gitlab.com/Mikaela.keys - For example: https://github.com/Mikaela.keys
- Good ideas are made to be copied, so maybe there will be more repositories like this :wink: https://codeberg.org/Aminda.keys https://gitlab.com/Mikaela.keys
- Good ideas are made to be copied, so maybe there will be more repositories
like this :wink:
## Quick howto ## Quick howto
I don't mean this to be used directly, only to be took inspiration from. See the first I don't mean this to be used directly, only to be took inspiration from. See the
link in further reading. first link in further reading.
```bash ```bash
mkdir -p ~/src/gitea.blesmrt.net/Mikaela mkdir -p ~/src/codeberg.org/Aminda
cd ~/src/gitea.blesmrt.net/Mikaela cd ~/src/codeberg.org/Aminda
git clone https://gitea.blesmrt.net/Mikaela/ssh-allowed_signers.git git clone https://codeberg.org/Aminda/ssh-allowed_signers.git
git config --global gpg.ssh.allowedSignersFile ~/src/gitea.blesmrt.net/Mikaela/ssh-allowed_signers/allowed_signers git config --global gpg.ssh.allowedSignersFile ~/src/codeberg.org/Aminda/ssh-allowed_signers/allowed_signers
``` ```
Git commands, such as `git verify-commit --raw HEAD` or `git log --show-signature`, Git commands, such as `git verify-commit --raw HEAD` or
should now recognised commits signed with keys I have allowed. `git log --show-signature`, should now recognised commits signed with keys I
In the last command it's fine to remove `--global` to only affect the single have allowed. In the last command it's fine to remove `--global` to only affect
repository you are on (while I haven't tested this), should that repository the single repository you are on (while I haven't tested this), should that
be something only I am signing in or something I need to verify otherwise repository be something only I am signing in or something I need to verify
enough to list it here. otherwise enough to list it here.
On the last command, `git config` turns it into absolute path, while manually On the last command, `git config` turns it into absolute path, while manually
edited `.gitconfig` can literally have the above. I wonder if the command edited `.gitconfig` can literally have the above. I wonder if the command would
would understand `--` before the file, but not enough to actually try it :smiley: understand `--` before the file, but not enough to actually try it :smiley:
## Mirrors ## Mirrors
- https://codeberg.org/AMinda/ssh-allowed_signers
- https://gitea.blesmrt.net/mikaela/ssh-allowed_signers - https://gitea.blesmrt.net/mikaela/ssh-allowed_signers
- https://github.com/mikaela/ssh-allowed_signers - https://github.com/mikaela/ssh-allowed_signers
- https://gitlab.com/mikaela/ssh-allowed_signers - https://gitlab.com/mikaela/ssh-allowed_signers
- https://git.com.de/mikaela/ssh-allowed_signers & http://gitea.qzzf2qcfbhievvs5nzkccuwddroipy62qjocqtmgcgh75vd6w57m7yad.onion/Mikaela/ssh-allowed_signers - https://git.com.de/mikaela/ssh-allowed_signers &
http://gitea.qzzf2qcfbhievvs5nzkccuwddroipy62qjocqtmgcgh75vd6w57m7yad.onion/Mikaela/ssh-allowed_signers
## Further reading ## Further reading
- [Caleb Hearth: Signing Git Commits with Your SSH Key](https://calebhearth.com/sign-git-with-ssh) ([web.archive.org](https://web.archive.org/web/20211117182628/https://calebhearth.com/sign-git-with-ssh)) inspired me to try this - [Caleb Hearth: Signing Git Commits with Your SSH Key](https://calebhearth.com/sign-git-with-ssh)
- [Andrew Ayer: It's Now Possible To Sign Arbitrary Data With Your SSH Keys](https://www.agwa.name/blog/post/ssh_signatures) instructs on signing and verifying files outside of git ([web.archive.org](https://web.archive.org/web/20211117182628/https://calebhearth.com/sign-git-with-ssh))
inspired me to try this
- [Andrew Ayer: It's Now Possible To Sign Arbitrary Data With Your SSH Keys](https://www.agwa.name/blog/post/ssh_signatures)
instructs on signing and verifying files outside of git
### Forge support ### Forge support
- 🥇 [Gitea v1.16.0 brought support for SSH signed commits on 2022-01-30.](https://blog.gitea.io/2022/02/gitea-1.16.0-and-1.16.1-released/) ([tag](https://github.com/go-gitea/gitea/releases/tag/v1.16.0)) - 🥇
[Gitea v1.16.0 brought support for SSH signed commits on 2022-01-30.](https://blog.gitea.io/2022/02/gitea-1.16.0-and-1.16.1-released/)
([tag](https://github.com/go-gitea/gitea/releases/tag/v1.16.0))
- [Their Git hosting comparison also includes SSH Signed Commits](https://docs.gitea.io/en-us/comparison/#code-management). - [Their Git hosting comparison also includes SSH Signed Commits](https://docs.gitea.io/en-us/comparison/#code-management).
- [The first release of Forĝejo was 1.18](https://forgejo.org/2022-12-29-release-v1-18-0/), so it had support since the beginning :tada:. - [The first release of Forĝejo was 1.18](https://forgejo.org/2022-12-29-release-v1-18-0/),
- 🥈 [GitHub started supporting SSH signed commits on 2022-08-23](https://github.blog/changelog/2022-08-23-ssh-commit-verification-now-supported/). so it had support since the beginning :tada:.
- 🥈
[GitHub started supporting SSH signed commits on 2022-08-23](https://github.blog/changelog/2022-08-23-ssh-commit-verification-now-supported/).
- [About commit signature verification](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification#ssh-commit-signature-verification). - [About commit signature verification](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification#ssh-commit-signature-verification).
- 🥉 [GitLab 15.7 started supporting SSH signatures on 2022-12-22](https://about.gitlab.com/releases/2022/12/22/gitlab-15-7-released/). - 🥉
[GitLab 15.7 started supporting SSH signatures on 2022-12-22](https://about.gitlab.com/releases/2022/12/22/gitlab-15-7-released/).
- [Sign commits with SSH keys](https://docs.gitlab.com/ee/user/project/repository/ssh_signed_commits/). - [Sign commits with SSH keys](https://docs.gitlab.com/ee/user/project/repository/ssh_signed_commits/).

7
package.json Normal file
View File

@ -0,0 +1,7 @@
{
"devDependencies": {
"@aminda/global-prettier-config": "2024.28.4"
},
"packageManager": "pnpm@9.7.0+sha512.dc09430156b427f5ecfc79888899e1c39d2d690f004be70e05230b72cb173d96839587545d09429b55ac3c429c801b4dc3c0e002f653830a420fa2dd4e3cf9cf",
"prettier": "@aminda/global-prettier-config"
}

174
pnpm-lock.yaml Normal file
View File

@ -0,0 +1,174 @@
lockfileVersion: "9.0"
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
importers:
.:
devDependencies:
"@aminda/global-prettier-config":
specifier: 2024.28.4
version: 2024.28.4
packages:
"@aminda/global-prettier-config@2024.28.4":
resolution:
{
integrity: sha512-VjyTd8fFRnLgZRAMDRr9pm5hknnsVxpTCshvvE7RAiuH72hUzC82rm5vXDJjrhkedWJir2qZjmiC5Vo2LoR4tw==,
}
"@prettier/plugin-ruby@4.0.4":
resolution:
{
integrity: sha512-lCpvfS/dQU5WrwN3AQ5vR8qrvj2h5gE41X08NNzAAXvHdM4zwwGRcP2sHSxfu6n6No+ljWCVx95NvJPFTTjCTg==,
}
peerDependencies:
prettier: ^3.0.0
"@prettier/plugin-xml@3.4.1":
resolution:
{
integrity: sha512-Uf/6/+9ez6z/IvZErgobZ2G9n1ybxF5BhCd7eMcKqfoWuOzzNUxBipNo3QAP8kRC1VD18TIo84no7LhqtyDcTg==,
}
peerDependencies:
prettier: ^3.0.0
"@taplo/core@0.1.1":
resolution:
{
integrity: sha512-BG/zLGf5wiNXGEVPvUAAX/4ilB3PwDUY2o0MV0y47mZbDZ9ad9UK/cIQsILat3bqbPJsALVbU6k3cskNZ3vAQg==,
}
"@taplo/lib@0.4.0-alpha.2":
resolution:
{
integrity: sha512-DV/Re3DPVY+BhBtLZ3dmP4mP6YMLSsgq9qGLXwOV38lvNF/fBlgvQswzlXmzCEefL/3q2eMoefZpOI/+GLuCNA==,
}
"@xml-tools/parser@1.0.11":
resolution:
{
integrity: sha512-aKqQ077XnR+oQtHJlrAflaZaL7qZsulWc/i/ZEooar5JiWj1eLt0+Wg28cpa+XLney107wXqneC+oG1IZvxkTA==,
}
chevrotain@7.1.1:
resolution:
{
integrity: sha512-wy3mC1x4ye+O+QkEinVJkPf5u2vsrDIYW9G7ZuwFl6v/Yu0LwUuT2POsb+NUWApebyxfkQq6+yDfRExbnI5rcw==,
}
mvdan-sh@0.10.1:
resolution:
{
integrity: sha512-kMbrH0EObaKmK3nVRKUIIya1dpASHIEusM13S4V1ViHFuxuNxCo+arxoa6j/dbV22YBGjl7UKJm9QQKJ2Crzhg==,
}
prettier-plugin-nginx@1.0.3:
resolution:
{
integrity: sha512-vV5q85s8XnV6NEgvz1gVLfZhmxAxY03MyOYj2ApBpjFkbs00lRsRkTmqO9L39ADuD18z1RRCcfZ3eVxKhI/nqg==,
}
prettier-plugin-sh@0.14.0:
resolution:
{
integrity: sha512-hfXulj5+zEl/ulrO5kMuuTPKmXvOg0bnLHY1hKFNN/N+/903iZbNp8NyZBTsgI8dtkSgFfAEIQq0IQTyP1ZVFQ==,
}
engines: { node: ">=16.0.0" }
peerDependencies:
prettier: ^3.0.3
prettier-plugin-toml@2.0.1:
resolution:
{
integrity: sha512-99z1YOkViECHtXQjGIigd3talI/ybUI1zB3yniAwUrlWBXupNXThB1hM6bwSMUEj2/+tomTlMtT98F5t4s8IWA==,
}
engines: { node: ">=16.0.0" }
peerDependencies:
prettier: ^3.0.3
prettier@3.3.3:
resolution:
{
integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==,
}
engines: { node: ">=14" }
hasBin: true
regexp-to-ast@0.5.0:
resolution:
{
integrity: sha512-tlbJqcMHnPKI9zSrystikWKwHkBqu2a/Sgw01h3zFjvYrMxEDYHzzoMZnUrbIfpTFEsoRnnviOXNCzFiSc54Qw==,
}
sh-syntax@0.4.2:
resolution:
{
integrity: sha512-/l2UZ5fhGZLVZa16XQM9/Vq/hezGGbdHeVEA01uWjOL1+7Ek/gt6FquW0iKKws4a9AYPYvlz6RyVvjh3JxOteg==,
}
engines: { node: ">=16.0.0" }
tslib@2.6.3:
resolution:
{
integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==,
}
snapshots:
"@aminda/global-prettier-config@2024.28.4":
dependencies:
"@prettier/plugin-ruby": 4.0.4(prettier@3.3.3)
"@prettier/plugin-xml": 3.4.1(prettier@3.3.3)
prettier: 3.3.3
prettier-plugin-nginx: 1.0.3
prettier-plugin-sh: 0.14.0(prettier@3.3.3)
prettier-plugin-toml: 2.0.1(prettier@3.3.3)
"@prettier/plugin-ruby@4.0.4(prettier@3.3.3)":
dependencies:
prettier: 3.3.3
"@prettier/plugin-xml@3.4.1(prettier@3.3.3)":
dependencies:
"@xml-tools/parser": 1.0.11
prettier: 3.3.3
"@taplo/core@0.1.1": {}
"@taplo/lib@0.4.0-alpha.2":
dependencies:
"@taplo/core": 0.1.1
"@xml-tools/parser@1.0.11":
dependencies:
chevrotain: 7.1.1
chevrotain@7.1.1:
dependencies:
regexp-to-ast: 0.5.0
mvdan-sh@0.10.1: {}
prettier-plugin-nginx@1.0.3: {}
prettier-plugin-sh@0.14.0(prettier@3.3.3):
dependencies:
mvdan-sh: 0.10.1
prettier: 3.3.3
sh-syntax: 0.4.2
prettier-plugin-toml@2.0.1(prettier@3.3.3):
dependencies:
"@taplo/lib": 0.4.0-alpha.2
prettier: 3.3.3
prettier@3.3.3: {}
regexp-to-ast@0.5.0: {}
sh-syntax@0.4.2:
dependencies:
tslib: 2.6.3
tslib@2.6.3: {}