Linbreux / wikmd

A file based wiki that uses markdown
https://linbreux.github.io/wikmd/
MIT License
325 stars 37 forks source link

How to add git authentication? #129

Open ebbeknudsen opened 8 months ago

ebbeknudsen commented 8 months ago

Hello. How would I got about adding authentication (like an SSH key) to be able to sync the wiki with my git remote?

What is the recommended approach?

  1. Create a ssh key in my host and map the file into container
    • How do I add the ssh key to the agent inside the container?
  2. Manually perform something like docker exec into the container, and create the ssh configuration?
    • I feel like manually performing something inside a docker container is contradictory to the purpose of docker containers. I would have to do this again if i ever recreate the container or something similar

What is the recommended approach? I think the documentation is very lackluser on this topic, it just links to githubs documentation of how to add an ssh key

Thanks for the help!

Linbreux commented 8 months ago

Hi @ebbeknudsen

My excuses for the not so clear documentation. I did not test this feature inside docker yet... I'll try to find out we can implement that. I did a quick test and it did indeed not work as it should.

Using it without docker does seem to work fine.

IXEguy commented 6 months ago

Spent some time trying to get this work.

First, I updated my volumes to the below: ` volumes:

From within the container when I run ssh -T git@github.com per the github recommendation to test if the key is working, I get the expected message.

However, when I edit pages, I don't see anything pushed to my github repo. I have both environment variables and & the yaml file setup. I was hoping at least one of them would get picked up.

Also, wanted to point out, the yaml variable is sync_with_remote, whereas the environment variable documentation refers to both is SYNCH_WITH_REMOTE and SYNC_WITH_REMOTE Minor difference, but probably nice to keep the similar in the long term.

arcoast commented 1 month ago

I'm also not able to get this working in a docker container. For me this seems like an absolute perfect markdown wiki with a git backend, but only if it can be deployed in a container environment.