requarks / wiki-v1

Legacy version (1.x) of Wiki.js
https://wiki.js.org
GNU Affero General Public License v3.0
101 stars 75 forks source link

Not pushing to git? #129

Open madchap opened 5 years ago

madchap commented 5 years ago

Using latest docker image, through docker-compose. Site works fine.

Actual behavior

Upon saving, nothing gets pushed. Nothing in the container logs.

If I exec into the container, git works (eventually after a git pull --allow-unrelated-histories), I can git push and all. Local git changes are well there, as a git log can attest.

There seems to be no action whatsoever with git backend.

git:                                                                                                                           
  url: git@gitlab.com:myrepo/wikijs.git
  branch: master               
  auth: 

    # Type: basic or ssh
    type: ssh          

    # Only for SSH authentication:
    privateKey: /etc/wiki/keys/git.pem

    sslVerify: true  

  # Default email to use as commit author
  serverEmail: xxxxxxx@gmail.com

  # Whether to use user email as author in commits
  showUserEmail: true  

  signature:         
    name: Fred Blaise
    email: xxxxxxx@gmail.com

Expected behavior

Upon saving, my changes are pushed.

madchap commented 5 years ago

So it seems to now be automagically work now? hmmm. Looks like halloween did its thing.

madchap commented 5 years ago

Actually, re-opening -- maybe for a feature request?

Is it really doing its thing every 5mn, and not being event-based on save?

NGPixel commented 5 years ago

No, this is by design. While all commits are event based, the sync is done periodically as it's a network intensive operation.

v2 will likely have a setting to set the sync delay, but doing a sync on every event is not a good idea.

johnshumon commented 5 years ago

Is it mandatory for private key to be in .pem extension/format? Following is my configuration but it doesn't push anything to git. Also deploy key is added in the repository with write permission

git:
  url: git@gitlab.com:myrepo/wiki.git
  branch: master
  auth:
    # Type: basic or ssh
    type: ssh
    privateKey: ./keys/wikijs_rsa
    sslVerify: true

  signature:
    name: 'John Doe'
    email: info@domain.com

  # Default email to use as commit author
  serverEmail: info@domain.com

  # Whether to use user email as author in commits
  showUserEmail: true
NGPixel commented 5 years ago

@johnshumon The key can be in any file extension (or not at all). However, the format must be a valid one accepted by git ssh.