Logs:
0|wiki | { code: 128,
0|wiki | message: 'git --git-dir=repo/.git --work-tree=repo push origin masterfailed with code 128',
0|wiki | stderr: 'fatal: could not read Username for \'https://github.com\': No such device or address\n',
0|wiki | stdout: '' }
Config:
git:
url: [email protected]:WumpusPrime/wiki.git
branch: master
auth:
# Type: basic or ssh
type: ssh
# Only for Basic authentication:
username: // DiscordWiki
password: // yayayaa
# Only for SSH authentication:
privateKey: /home/wiki/.ssh/id_rsa
Remove the parameters username and password from your config file. They are not used in SSH authentication at all.
The // in the username field is most likely causing an issue when building the git remote.
I didn't leave them in, I just did it to signal those fields were in fact empty. Removing them still ignores ssh auth
Can you paste the contents of /path-to-your-wiki/repo/.git/config file? It might be a config mismatch issue.
Sure
wiki@webconsole:~$ cat wiki/repo/.git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
sshCommand = ssh -i \"/home/wiki/.ssh/id_rsa\" -o StrictHostKeyChecking=no
[user]
name = Discord Wiki
email = [email protected]
[http]
sslVerify = true
[remote "origin"]
url = https://github.com/WumpusPrime/wiki
fetch = +refs/heads/*:refs/remotes/origin/*
wiki@webconsole:~$
Here's the root cause. Once the repo folder is created, any changes to the git URL / authentication settings will not be reflected into the actual repo git config. I'll add some code in the future to make sure both matches when starting Wiki.js. In the meantime, you have 2 solutions:
url parameter below the [remote "origin"] block to use the new value [email protected]:WumpusPrime/wiki.git. Save and restart Wiki.js.Okay, that made it worse. I went with option 2, and obviously it deleted all uncommitted pages. Then, to top things off, now the deleted pages are still there in the sense the database thinks they're there: but you can't view them
Pages are always committed as soon as they are created / modified.
What do you mean by deleted pages are still there? What behavior shows delete entries? Indexes and cache is rebuilt completely when restarting Wiki.js.
You can't create the page, it says it exists: but when you go to edit it, it doesn't exist
It would be great if you could sync the git remote setting when starting the app. I had some problem today with git because I set the url to https at first. And then I realize I actually need the [email protected] url (since I'm using ssh auth). I had to manually change the url in the git repo.
Fixed in Beta 11 (642bcac472fb7e743fe8f3eda8c16fc93680107b)
This still got me with version 1.0.102.
I set it up to use SSH authentication from the beginning, but the config file then included a username, password, and the wrong GitHub URL (https...) and took a while to find why the commits were not being made.
Most helpful comment
Here's the root cause. Once the repo folder is created, any changes to the git URL / authentication settings will not be reflected into the actual repo git config. I'll add some code in the future to make sure both matches when starting Wiki.js. In the meantime, you have 2 solutions:
urlparameter below the[remote "origin"]block to use the new value[email protected]:WumpusPrime/wiki.git. Save and restart Wiki.js.