Skip to content

Troubleshooting

Each entry lists the symptom, the cause, how to confirm it and the fix. Replace gh-maintainer.example.com with your host and <user> with your basic-auth user.

The widget opens without a password on Traefik

Section titled “The widget opens without a password on Traefik”

Cause: Traefik ignores the nginx.ingress.kubernetes.io/auth-* annotations in the base. On Traefik, basic auth comes only from the basic-auth Middleware in the component deploy/components/traefik. If your overlay doesn’t include the component, the Middleware is missing and the Ingress does not reference it, so the widget is open to anyone who can reach the ingress.

Confirm: a request without credentials must answer 401:

Terminal window
curl -sk -o /dev/null -w '%{http_code}\n' https://gh-maintainer.example.com/state
kubectl -n gh-maintainer get middleware basic-auth
kubectl -n gh-maintainer get ingress status-server \
-o jsonpath='{.metadata.annotations.traefik\.ingress\.kubernetes\.io/router\.middlewares}'; echo

Fix: add the deploy/components/traefik component to your overlay (components: [../../components/traefik], as in deploy/overlays/example), apply the overlay and create the Traefik secret, see Traefik basic auth. The annotation must read gh-maintainer-basic-auth@kubernetescrd.

Traefik answers 404, or logs “must be single element exactly”

Section titled “Traefik answers 404, or logs “must be single element exactly””

Cause: the Middleware from the deploy/components/traefik component cannot load its secret. gh-maintainer-traefik-auth must exist and hold exactly one key, users. Traefik rejects a secret with more keys, and it does not use the nginx secret gh-maintainer-auth (key auth).

Confirm:

Terminal window
kubectl -n gh-maintainer get secret gh-maintainer-traefik-auth \
-o go-template='{{range $k, $v := .data}}{{$k}}{{"\n"}}{{end}}' # must print only: users
kubectl -n ingress logs -l app.kubernetes.io/name=traefik --tail=200 | grep -i gh-maintainer

The Traefik label and namespace can differ on your cluster; kubectl -n ingress get pods shows the pod names.

Fix: recreate the secret with a single key:

Terminal window
kubectl -n gh-maintainer delete secret gh-maintainer-traefik-auth
kubectl -n gh-maintainer create secret generic gh-maintainer-traefik-auth \
--from-file=users=deploy/auth.htpasswd

The widget shows 503, or the tray turns grey, during a rollout

Section titled “The widget shows 503, or the tray turns grey, during a rollout”

Cause: the status server uses the Recreate strategy, because SQLite on a ReadWriteOnce volume must never be opened by two pods. The old pod stops before the new one is ready, so there are a few seconds without a backend.

Confirm:

Terminal window
kubectl -n gh-maintainer rollout status deployment/status-server
kubectl -n gh-maintainer get pods -l app=status-server

Fix: wait. The widget and the tray reconnect on their own once the new pod is ready. If the pod does not become ready, see the next entry.

The status server crash-loops or the job fails with “OWNER/owner must be your GitHub user or organization name”

Section titled “The status server crash-loops or the job fails with “OWNER/owner must be your GitHub user or organization name””

Cause: the GitHub owner is still the placeholder CHANGE_ME from the base (or another invalid name). This happens when you apply deploy/overlays/ghcr, a release manifest or an unedited copy of deploy/overlays/example. Both components refuse to start on purpose, so they never act on someone else’s account:

  • The status server exits at start and goes into CrashLoopBackOff with status-server: OWNER must be your GitHub user or organization name (got "CHANGE_ME").
  • Every agent job ends with gh-maintainer: startup failed: ... and a message that contains owner must be your GitHub user or organization name.

Confirm:

Terminal window
kubectl -n gh-maintainer logs deployment/status-server --previous | tail -5
kubectl -n gh-maintainer get configmap gh-maintainer-config -o jsonpath='{.data.config\.yaml}' | grep owner
kubectl -n gh-maintainer get deployment status-server \
-o jsonpath='{.spec.template.spec.containers[0].env[?(@.name=="OWNER")].value}'; echo

Fix: set your GitHub user or organization name in both places of your overlay: owner: in config.yaml and the OWNER value in the status-server patch of kustomization.yaml. Then apply the overlay:

Terminal window
kubectl kustomize deploy/overlays/mine | grep -E 'owner:|OWNER' -A1 # no CHANGE_ME left
kubectl apply -k deploy/overlays/mine

See Use your own overlay and Set the owner in both places.

Cause: if the log names OWNER, see the previous entry. Otherwise, usually the data volume is not writable by uid 10001. Hostpath provisioners ignore fsGroup, so the server fails to open /data/state.db. A missing EVENT_TOKEN or GITHUB_TOKEN also stops it at start.

Confirm:

Terminal window
kubectl -n gh-maintainer logs deployment/status-server --previous | tail -20

Fix: for a permission error, change the owner of the volume directory on the node:

Terminal window
PV=$(kubectl -n gh-maintainer get pvc status-server-data -o jsonpath='{.spec.volumeName}')
DIR=$(kubectl get pv "$PV" -o jsonpath='{.spec.hostPath.path}')
sudo chown 10001:10001 "$DIR"
kubectl -n gh-maintainer rollout restart deployment/status-server

For EVENT_TOKEN and GITHUB_TOKEN must be set, check the keys of the Secret gh-maintainer, see Apply the app secret.

Cause: the NetworkPolicy status-server-ingress only admits traffic from agent pods and from the namespaces ingress, ingress-nginx, traefik and kube-system (or the one your overlay sets). If your ingress controller runs in another namespace, its requests are dropped.

Confirm:

Terminal window
kubectl get pods -A | grep -Ei 'traefik|ingress'
kubectl -n gh-maintainer get networkpolicy status-server-ingress -o yaml | grep -A6 namespaceSelector

Fix: patch the namespace selector in your overlay, see Adapt to your cluster.

Cause: with the deploy/components/private-ca component, the TLS certificate is issued by gh-maintainer’s private CA, which your client does not trust yet.

Fix: trust the private CA once per client, or remove the component from your overlay and bring a publicly trusted certificate, see TLS and the private CA.

Cause: a secret file under /secrets is missing, empty or unreadable, or the config is invalid (including owner: CHANGE_ME, see the owner entry). The pod exits with code 1.

Confirm:

Terminal window
kubectl -n gh-maintainer logs job/<job-name> -c agent | grep -E 'startup failed|run failed'

Fix: for a secret, check the three keys of the Secret gh-maintainer and that the pod runs as uid 10001 with fsGroup: 10001. For a config error, the message names the invalid key; compare it with the configuration reference. A 401 from GitHub also exits 1: check that the token is valid and not expired.

Cause: the latest run ran with dryRun: true. The base ConfigMap in deploy/base/configmap.yaml and the template deploy/overlays/example keep dryRun: true as the safe default. Applying the base, deploy/overlays/ghcr or a release manifest restores it.

Confirm:

Terminal window
kubectl -n gh-maintainer get configmap gh-maintainer-config -o jsonpath='{.data.config\.yaml}' | grep dryRun
curl -s -u <user> https://gh-maintainer.example.com/state | jq .dryRun

Fix: set dryRun: false in your own overlay’s ConfigMap patch and apply the overlay, see Switch from dry run to live. The badge disappears after the next run starts.

Every repository has a gitleaks scanner-error finding

Section titled “Every repository has a gitleaks scanner-error finding”

Cause: older agent images ran gitleaks with its report on /dev/stdout. In the container, stdout is a pipe that gitleaks cannot open, so every gitleaks run failed. Newer images write the report to a temporary file.

Confirm: every repository has a scanner-error finding with source gitleaks:

Terminal window
curl -s -u <user> https://gh-maintainer.example.com/state \
| jq '.findings[] | select(.rule=="scanner-error") | {repo, source, title}'

Fix: upgrade to a current image, see Upgrade. The scanner-error findings resolve after the next successful local scan of each repository (at most once per security.localScanIntervalHours).

A branch deletion fails with “Reference does not exist”

Section titled “A branch deletion fails with “Reference does not exist””

Cause: GitHub already deleted the branch, typically because the repository has “Automatically delete head branches” enabled and the PR was just merged. Older agent images reported this as repo.error.

Confirm: the repository tile is red and the repo.error message contains Reference does not exist.

Fix: upgrade to a current image. Newer images treat an already-deleted branch as done.

Approvals stay open for PRs that were already merged or closed

Section titled “Approvals stay open for PRs that were already merged or closed”

Cause: someone merged or closed the PR directly on GitHub. The widget only learns about it when the status server checks.

Confirm: open the PR link from the approval.

Fix: nothing, usually. The status server closes such approvals after every agent run and when it starts. To clear one right away, click Approve: the server sees that the PR is merged or closed, answers pr already merged or pr closed, and closes the approval. Or restart the server:

Terminal window
kubectl -n gh-maintainer rollout restart deployment/status-server

Approve answers “blocked by branch protection”

Section titled “Approve answers “blocked by branch protection””

Cause: GitHub would refuse the merge: a required review is missing, the branch is behind its base, or the PR is a draft. The approval stays open.

Fix: give the required review or click Update branch on GitHub, wait for CI, then approve again. Note that an “Update branch” merge is a foreign commit, so a Dependabot PR updated that way always needs an approval from then on.

Cause: the token’s remaining REST quota (5,000 requests per hour) dropped below 100, or GitHub answered with a rate-limit error. The agent stops starting new repositories, marks the interrupted one pending and finishes the run.

Confirm:

Terminal window
curl -s -u <user> https://gh-maintainer.example.com/state \
| jq '.recentEvents[] | select(.type=="run.rate_limited") | {ts, data}'

Fix: nothing. The next run continues, and the repository order rotates every run. An occasional rate limit on a first run across many repositories is normal. If it happens on every run, narrow the scope with repos.include or repos.exclude, or check whether other tools use the same token.

Cause: one of the fixer’s gates is closed. Look at the pr.pending reason for the PR:

Reason Cause Fix
fixer disabled fixer.enabled is false, or fixer.repos is set and does not contain this repository Enable it, or add the repository name (not owner/name) to fixer.repos
cooldown A fix was already attempted within fixer.cooldownHours (dry-run attempts count too) Wait for the cooldown
time budget The run was older than 45 minutes when it reached this PR Wait; the repository order rotates
checks CI has not finished, or the PR has no CI at all Wait, or add CI to the repository

Confirm:

Terminal window
curl -s -u <user> https://gh-maintainer.example.com/state \
| jq '.recentEvents[] | select(.type=="pr.pending") | {repo, pr: .data.pr, reason: .data.reason}'

The fixer also only handles PRs opened by dependabot[bot] with failing checks. A PR with a foreign commit goes to the approval queue instead.

A Dependabot PR stays pending with reason checks

Section titled “A Dependabot PR stays pending with reason checks”

Cause: the repository has no CI. Without check runs or commit statuses, the checks state stays pending, so the PR is never merged or fixed.

Fix: merge such PRs by hand, or add a CI workflow.

Cause: the agent retries a POST whose response was lost (for example a timeout), and the server has no idempotency key. The same events are stored twice.

Fix: none needed; it is cosmetic. Fix-attempt bookkeeping may also count twice, which can only lengthen a cooldown.

The agent pod is OOMKilled and the run is aborted

Section titled “The agent pod is OOMKilled and the run is aborted”

Cause: scanner output is read into memory in full. A very large repository can push the agent container past its 3 Gi memory limit.

Confirm:

Terminal window
kubectl -n gh-maintainer get pods -l app=gh-maintainer-agent
kubectl -n gh-maintainer describe pod <pod-name> | grep -i oomkilled

Fix: add the repository to repos.exclude, or raise the memory limit in your overlay.

The app cannot connect over HTTPS (grey tray icon)

Section titled “The app cannot connect over HTTPS (grey tray icon)”

Cause: the app uses the system trust store. If your installation uses the private CA and the CA is not installed system-wide, every request fails the TLS check. A wrong URL or wrong credentials also keep the icon grey.

Confirm: from the same machine, this must print 401, not a certificate error:

Terminal window
curl -s -o /dev/null -w '%{http_code}\n' https://gh-maintainer.example.com/state

Fix: install the CA system-wide as described in Trust the private CA, then restart the app. If curl -u <user> works but the app does not, check the URL with Change server… and percent-encode special characters in the password.

apt prints a notice about _apt and permissions

Section titled “apt prints a notice about _apt and permissions”

Cause: apt downloads local packages as the unprivileged _apt user, which cannot read your home directory. The notice is harmless; the package still installs.

Fix: copy the .deb to /tmp first:

Terminal window
cp gh-maintainer_<version>_amd64.deb /tmp/
sudo apt install /tmp/gh-maintainer_<version>_amd64.deb

macOS says “gh-maintainer is damaged and can’t be opened”

Section titled “macOS says “gh-maintainer is damaged and can’t be opened””

Cause: the app is not code-signed, so Gatekeeper blocks it.

Fix:

Terminal window
xattr -dr com.apple.quarantine /Applications/gh-maintainer.app

Cause: the installer is not code-signed.

Fix: choose More info, then Run anyway.

Clicking the tray icon on Linux does not open the window

Section titled “Clicking the tray icon on Linux does not open the window”

Cause: with AppIndicator, a click only opens the menu.

Fix: choose Show in the tray menu.

Collect the agent log of the failing job, the status-server log and the output of /state, remove any tokens, and open an issue on GitHub.