Quickstart: register the first local repository
The shortest way from “the plugin is installed” to “a repository on the server's disk reports ok and shows branches, tags and commits in the wiki”. Four steps, about ten minutes.
To draw the line: this plugin reads repositories in the server's file system through the git program. Repositories hosted in Azure DevOps are served by wkdoadogit.
Prerequisites
wkdogit,wkdocore,wkdostorageandwkcoreare installed and enabled.gitis installed on the server, and the user PHP runs as may execute it.- A repository on that server's disk, readable by the same user.
- Optional:
wksourceview, so files can be embedded on pages.
Step 1: name the binary
Admin → Configuration, section wkdogit, setting git_binary. It is empty by default, so nothing works until it is set.
Enter an absolute path — on Linux something like /usr/bin/git, on Windows the full path to git.exe.
A bare git relies on the web server's search path. That produces a plugin which works from a shell and not from the wiki, which is a needlessly confusing thing to debug.
git_binary is git, that is, on the search path. That works as long as the web server service inherits the same environment; if calls fail inexplicably, the absolute path is the first thing to try.
Step 2: confine where repositories may live
Set git_repo_root to the directory holding them.
This setting bounds which paths may be registered and used. Set it before registering anything: it decides whether “a repository path” means one of yours or any path on the machine. On this installation it is empty, so unconfined.
Step 3: check the web server can actually read it
A repository you may read is not necessarily readable by the web server's user. This is the commonest first failure and it has nothing to do with the plugin.
Confirm that the user PHP runs as can read the repository directory and its .git contents.
Step 4: register and check
Open the project's repos screen, for example /doku.php?id=en:projects:acme:repos&do=wkdogit.
Fill in under Register repository: Key, Title, Local path (inside the root from step 2) and Default branch. A local path or a remote URL is required; a remote URL must not contain credentials.
Choose Register, then Healthcheck on the row.
Check the result
- The Health column reads ok. When it reads otherwise — unreachable, invalid or denied — it is naming the reason rather than just a failure: missing binary, path outside the root, unreadable directory, or something that is not a repository.
- The opened repository shows Branches, Tags and commits.
- Every call is bounded by
git_timeout_ms, 5000 milliseconds by default. A very large repository can reach that limit on its first listing; the answer usually lies with the repository rather than with the setting.
Next step
- wksourceview — show a file from it on a wiki page, through the
git:provider. - wkdogit (German) — the package page: the read model, the verb allowlist and all five settings, among them
max_bytesandmax_lines, which deliberately mirror the source viewer's own.