Giter Site home page Giter Site logo

Comments (14)

NGPixel avatar NGPixel commented on May 10, 2024

There's indeed an issue when using SSH authentication. I'll look into a fix asap. In the meantime, you can use basic authentication (using github personal access tokens) to get started.

Also, check your /home/wiki/wikijs/repo/ folder permissions/group. Wiki.js is unable to create the uploads sub-folder during initialization.

from wiki.

cbebry avatar cbebry commented on May 10, 2024

Thanks for the quick reply! I look forward to the SSH auth solution :)

Oddly enough it looks like the upload folder was created fine even with the error. I checked the permissions and they're all default owned to the repository user.

from wiki.

NGPixel avatar NGPixel commented on May 10, 2024

You're right, I just verified that permissions check function call and there was a typo in the folder name. You can manually create a folder named "upload" (without a "s") as a temporary workaround to silence that error.

from wiki.

NGPixel avatar NGPixel commented on May 10, 2024

SSH authentication should now be working. Upgrade to Beta 4.

Note that you will need to delete your local repo folder before starting the app again. It will then be created again using the correct config.

You must also remove the "publicKey" entry from your config.yml. Also make sure your private key is not encrypted with a passphrase. The connection will fail otherwise, unless you have configured your ssh-agent to handle the passphrase prompt.

Nick

from wiki.

cbebry avatar cbebry commented on May 10, 2024

Thanks for looking into and programming something for the issue so fast.

I trashed my wiki folder and downloaded the latest (beta5). However I had some git issues appear still, and it looks similar to my original issue.

wiki@service:~/wikijs$ node server.js
2017-02-13T05:17:23.833Z - info: [SERVER] Wiki.js is initializing...
2017-02-13T05:17:24.183Z - info: [SERVER.Local] Checking data directories...
2017-02-13T05:17:24.185Z - info: [SERVER.Local] Data and Repository directories are OK.
2017-02-13T05:17:24.567Z - info: [SERVER.Git] Checking Git repository...
2017-02-13T05:17:25.472Z - info: [SERVER] Starting HTTP/WS server on port 6467...
2017-02-13T05:17:25.490Z - info: [SERVER] HTTP/WS server started successfully! [RUNNING]
2017-02-13T05:17:25.530Z - info: [SERVER.Search] Search index flushed and ready.
2017-02-13T05:17:25.599Z - info: [AGENT] Background Agent is initializing...
2017-02-13T05:17:25.614Z - info: [SERVER.Git] Git repository is OK.
2017-02-13T05:17:26.344Z - info: [AGENT.Git] Checking Git repository...
2017-02-13T05:17:26.675Z - info: [AGENT] Running all jobs...
2017-02-13T05:17:26.747Z - info: [AGENT.Git] Git repository is OK.
2017-02-13T05:17:26.761Z - info: [AGENT.Git] Performing pull from remote repository...
2017-02-13T05:17:27.061Z - error: [AGENT.Git] Unable to fetch from git origin!
2017-02-13T05:17:27.061Z - error: [AGENT][GIT] Unable to push changes to remote!
2017-02-13T05:17:27.063Z - error: [AGENT] One or more jobs have failed:  
{ code: 128,
  message: '`git --git-dir=repo/.git --work-tree=repo pull origin master` failed with code 128',
  stderr: 'From github.com:spectrumbranch/edu.spectrumbranch.com\n * branch            master     -> FETCH_HEAD\nfatal: This operation must be run in a work tree\n',
  stdout: '' }

I modified my config file as you mentioned, so here is its current state:

git:
  url: [email protected]:spectrumbranch/edu.spectrumbranch.com.git
  branch: master
  auth:
    type: ssh
    privateKey: /home/wiki/.ssh/id_rsa
    sslVerify: true
  signature:
    name: omitted
    email: omitted

Could there be anything else that I am doing wrong?

By the way I no longer see the upload folder error so that is positive!
Thanks again.

from wiki.

NGPixel avatar NGPixel commented on May 10, 2024

In your wikijs/repo folder, do you have a .git subfolder?
If yes, can you paste the contents of wikijs/repo/.git/config?

Thanks

from wiki.

cbebry avatar cbebry commented on May 10, 2024

Yes and yes:

wiki@service:~/wikijs/repo/.git$ cat config
[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
	sshCommand = ssh -i \"/home/wiki/.ssh/id_rsa\" -o StrictHostKeyChecking=no
[user]
	name = omitted
	email = omitted
[http]
	sslVerify = true
[remote "origin"]
	url = [email protected]:spectrumbranch/edu.spectrumbranch.com.git
	fetch = +refs/heads/*:refs/remotes/origin/*

from wiki.

NGPixel avatar NGPixel commented on May 10, 2024

Can you try something?

  1. Add a new file to your repo (e.g. test.md) on github.com, via the web UI, with random content.
  2. Delete the repo folder in your wikijs folder.
  3. Start Wiki.js

Any change in the logs?

Thanks

from wiki.

cbebry avatar cbebry commented on May 10, 2024

1.) https://github.com/spectrumbranch/edu.spectrumbranch.com/blob/master/test.md
2 + 3)

wiki@service:~/wikijs$ rm -Rf repo/
wiki@service:~/wikijs$ node server.js 
2017-02-13T05:50:31.118Z - info: [SERVER] Wiki.js is initializing...
2017-02-13T05:50:31.464Z - info: [SERVER.Local] Checking data directories...
2017-02-13T05:50:31.466Z - info: [SERVER.Local] Data and Repository directories are OK.
2017-02-13T05:50:31.853Z - info: [SERVER.Git] Checking Git repository...
2017-02-13T05:50:32.768Z - info: [SERVER] Starting HTTP/WS server on port 6467...
2017-02-13T05:50:32.786Z - info: [SERVER] HTTP/WS server started successfully! [RUNNING]
2017-02-13T05:50:32.827Z - info: [SERVER.Search] Search index flushed and ready.
2017-02-13T05:50:32.895Z - info: [AGENT] Background Agent is initializing...
2017-02-13T05:50:32.944Z - info: [SERVER.Git] Git repository is OK.
2017-02-13T05:50:33.648Z - info: [AGENT.Git] Checking Git repository...
2017-02-13T05:50:33.993Z - info: [AGENT] Running all jobs...
2017-02-13T05:50:34.063Z - info: [AGENT.Git] Git repository is OK.
2017-02-13T05:50:34.064Z - info: [AGENT.Git] Performing pull from remote repository...
2017-02-13T05:50:34.406Z - error: [AGENT.Git] Unable to fetch from git origin!
2017-02-13T05:50:34.407Z - error: [AGENT][GIT] Unable to push changes to remote!
2017-02-13T05:50:34.408Z - error: [AGENT] One or more jobs have failed:  
{ code: 128,
  message: '`git --git-dir=repo/.git --work-tree=repo pull origin master` failed with code 128',
  stderr: 'From github.com:spectrumbranch/edu.spectrumbranch.com\n * branch            master     -> FETCH_HEAD\n * [new branch]      master     -> origin/master\nfatal: This operation must be run in a work tree\n',
  stdout: '' }

from wiki.

NGPixel avatar NGPixel commented on May 10, 2024

Which distro/version of linux are you using? I'll setup a VM to try to reproduce your issue, as I can't replicate it from my windows machine.

from wiki.

cbebry avatar cbebry commented on May 10, 2024

I'm currently running a headless Debian "jessie"

wiki@service:~$ cat /etc/debian_version 
8.7
wiki@service:~$ git --version
git version 2.1.4

By the way, thank you. You've invested a lot of time into my issue already and I want to make sure you know I appreciate it.

from wiki.

NGPixel avatar NGPixel commented on May 10, 2024

Can you try upgrading git to latest version 2.11.1 ?

Thanks,
Nick

from wiki.

cbebry avatar cbebry commented on May 10, 2024

Interesting! The latest that debian jessie was providing was 2.1.4, so I installed the latest git from debian testing (2.11.0) and I no longer get the git error on startup!

wiki@service:~/wikijs$ node server.js 
2017-02-14T03:55:14.314Z - info: [SERVER] Wiki.js is initializing...
2017-02-14T03:55:14.662Z - info: [SERVER.Local] Checking data directories...
2017-02-14T03:55:14.664Z - info: [SERVER.Local] Data and Repository directories are OK.
2017-02-14T03:55:15.053Z - info: [SERVER.Git] Checking Git repository...
2017-02-14T03:55:15.964Z - info: [SERVER] Starting HTTP/WS server on port 6467...
2017-02-14T03:55:15.982Z - info: [SERVER] HTTP/WS server started successfully! [RUNNING]
2017-02-14T03:55:16.022Z - info: [SERVER.Search] Search index flushed and ready.
2017-02-14T03:55:16.093Z - info: [AGENT] Background Agent is initializing...
2017-02-14T03:55:16.139Z - info: [SERVER.Git] Git repository is OK.
2017-02-14T03:55:16.842Z - info: [AGENT.Git] Checking Git repository...
2017-02-14T03:55:17.172Z - info: [AGENT] Running all jobs...
2017-02-14T03:55:17.254Z - info: [AGENT.Git] Git repository is OK.
2017-02-14T03:55:17.255Z - info: [AGENT.Git] Performing pull from remote repository...
2017-02-14T03:55:17.597Z - info: [AGENT.Git] Pull completed.
2017-02-14T03:55:17.601Z - info: [AGENT.Git] Push skipped. Repository is already in sync.
2017-02-14T03:55:17.682Z - info: [AGENT] All jobs completed successfully! Going to sleep for now.

Thanks for all of your time. I'm looking forward to testing the wiki out :)

from wiki.

NGPixel avatar NGPixel commented on May 10, 2024

Glad we could sort this out! Looks like I'll add some more notes to the documentation in regards to the Git version.

from wiki.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.