Skip to content

Commit 8f8edd7

Browse files
committed
docs: add gpg
1 parent 5346fc8 commit 8f8edd7

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

docs/Authentication.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,22 @@ Just execute any authentication command like push/pull/clone and a pop window sh
8484
Alternatively, you can also leave that setting empty and always provide the username and password manually via the prompted modal in Obsidian. All available credential helpers are listed [here](https://git-scm.com/doc/credential-helpers).,
8585

8686
## SSH
87-
Remember you still have to setup ssh correctly, like adding your SSH key to the `ssh-agent`. GitHub provides a great documentation on how to [generate a new SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent?platform=windows#generating-a-new-ssh-key) and then on how to [add the SSH key to your ssh-agent](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent?platform=windows#adding-your-ssh-key-to-the-ssh-agent).
87+
Remember you still have to setup ssh correctly, like adding your SSH key to the `ssh-agent`. GitHub provides a great documentation on how to [generate a new SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent?platform=windows#generating-a-new-ssh-key) and then on how to [add the SSH key to your ssh-agent](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent?platform=windows#adding-your-ssh-key-to-the-ssh-agent).
88+
89+
90+
# GPG Signing
91+
92+
GitHub provides a great [documentation about GPG](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key), which should work with Obsidian as well.
93+
One issue you might encounter though is the following:
94+
```
95+
Error: error: cannot run gpg: No such file or directory
96+
error: gpg failed to sign the data
97+
fatal: failed to write commit object
98+
```
99+
100+
This means there is no `gpg` binary in your PATH, which you may have only properly configured for your shell. But since Obsidian is started in a different way, these PATH modifications don't affect Obsidian. To get the binary path of your `gpg` installation, run `which gpg` on Linux and Mac-OS and `where gpg` on Windows. A common location may be `/usr/local/bin/gpg`.
101+
102+
- You can either add that to the "Additional PATH environment variables" plugin setting to provide the gpg binary to your plugin installation only.
103+
- Or set it in your Git config via `git config --global gpg.program <your previous output>` to set the gpg binary globally for all git repositories.
104+
105+
Please create an issue if you encounter any issues and the documentation needs to be improved.

docs/Common issues.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,13 @@ It's important to note that once a file is committed (or staged) changing the `.
3535
2. The file should be listed as deleted in `git status`
3636
3. Commit the deletion
3737
4. Now any changes to the file are properly ignored.
38+
39+
## Cannot run gpg
40+
41+
```
42+
Error: error: cannot run gpg: No such file or directory
43+
error: gpg failed to sign the data
44+
fatal: failed to write commit object
45+
```
46+
47+
See [[Authentication#GPG Signing]] on how to solve this.

0 commit comments

Comments
 (0)