Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Troubleshooting

Start with drawbar doctor. It prints one line per check and, under each problem, one line that fixes it. drawbar status shows the install, the real git, the resolve cache and the config in force. Neither changes anything.

Git runs without the shim

path.order and path.git fail when ~/.local/bin is missing from PATH, comes after /usr/bin, or the first git on PATH is not the shim. Put ~/.local/bin first on PATH: add export PATH="$HOME/.local/bin:$PATH" to your shell profile and start a new shell.

After drawbar uninstall, run hash -r in open shells, or bash keeps trying the cached ~/.local/bin/git path.

A systemd user service that runs git can skip the shim too. systemd.path warns when such a service has no ~/.local/bin on its PATH, has /usr/bin ahead of it, or runs a git other than the shim by its absolute path. The fix names the place that sets the PATH. For a service, it reads:

$ systemctl --user edit <unit>
$ systemctl --user restart <unit>

with Environment="PATH=%h/.local/bin:/usr/local/bin:/usr/bin:/bin" under [Service] in the drop-in. A service whose Exec line runs git by an absolute path such as /usr/bin/git warns whatever its PATH.

drawbar: ignoring ... on stderr

The config file is unreadable, is not a regular file, is not valid TOML, or holds an unknown key or a bad value. The shim ignores the whole file and uses the defaults, and the line names the file and the problem. install.config fails in drawbar doctor for the same reason. Fix the file named. See Configuration.

While the config file is ignored, drawbar gc-daemons stops nothing, so a typo cannot stop the daemons your include list keeps.

Exit status 75

A leased command did not get the lease. Either another git command held it for the whole wait, or the lock file could not be opened. The line drawbar prints names the lock file and the fuser -v command that shows who holds it.

  • To wait longer, set DRAWBAR_LEASE_WAIT (seconds), or lease.timeout_secs in the config. The default is 120.
  • repos.lease-lock fails when this user cannot open a repository’s drawbar-lease.lock, so every leased git there exits 75. It warns when a process has held the lease for at least the lease wait.

See Per-repo lease.

Exit status 78, 126 or 127

Status 78 means the real git could not be resolved: DRAWBAR_DEPTH reached 16, DRAWBAR_REAL_GIT or AGENT_GIT_REAL names the shim or a copy of it, or no candidate is a usable git. install.real-git fails in drawbar doctor. When the candidates fail because git cannot read its config, doctor shows git’s error, which names the file, and gitconfig.read fails too.

Status 126 means the resolved git exists but could not be executed, and 127 means it disappeared before it could be executed. Each prints one drawbar: line that names the cause and the fix. See Exit codes and auto-GC guard.

drawbar install refuses

Install checks everything first and changes nothing when it refuses.

  • ~/.local/bin/git or ~/.local/bin/drawbar holds something drawbar did not make. Pass --adopt-legacy for a ~/.local/bin/git symlink that resolves to the agent-git wrapper at ~/.local/opt/agent-git/git, which must still exist, or --force for any file or symlink. Install never replaces a directory.
  • With --timers or --drawbard, a file at one of the unit names was not written by drawbar, the systemd user manager is not reachable, or systemd loads one of the units from another file. systemctl --user cat <unit> names that file.

See Installing, Scheduled maintenance and Running drawbard.

Fetches do not go through drawbard

Every fetch still works without drawbard: it takes the lease instead. drawbard.daemon in drawbar doctor says why drawbard is not answering, and drawbar status shows its socket and protocol.

  • Another protocol. The daemon is from an older or newer drawbar, so it refuses every fetch. This happens after an upgrade when drawbard was not restarted. Run systemctl --user restart drawbard.service.
  • Nothing listens. A drawbard.service is there, but no socket is. journalctl --user -u drawbard.service says why the daemon stopped or did not start: another daemon holds drawbard.lock, another user could replace XDG_RUNTIME_DIR or a directory above it, or something that is not a socket is at the socket path.
  • Nothing answers. A socket is there, but no daemon answers on it, as after a daemon was killed with SIGKILL. Restart drawbard, which replaces the socket.
  • Not a socket. Something other than a socket is at $XDG_RUNTIME_DIR/drawbar/drawbard.sock, and drawbard refuses to replace it. Look at what it is, remove it, then restart drawbard.
  • Not private. The shim does not use a socket that another user could reach or replace. The message names the path to fix.
  • No XDG_RUNTIME_DIR. A shell or service without it, such as a cron job or a su session, never looks for drawbard. Set it to the directory systemctl --user show-environment prints.

See Running drawbard.

drawbar build-git refuses

  • ~/.local/opt/git-<version> already exists. Remove that directory to rebuild.
  • /proc/meminfo shows less available memory than --min-free-ram, which defaults to 4G. 0 skips the check.
  • The version has no pinned SHA-256. Pass --sha256 <digest>.
  • The tarball’s digest does not match.
  • The host lacks the libcurl headers. The build stops in make with the compiler’s error, and a build is installed only when libexec/git-core holds git-remote-https and git-fsmonitor--daemon.

See Building Git.

fsmonitor daemons keep running

daemons.fsmonitor warns when a git fsmonitor--daemon is orphaned, excluded, or below the tracked-file threshold. drawbar gc-daemons stops those. A repository that turns core.fsmonitor on in its own git config gets its daemon back the next time git runs there, so list it in include if you want it kept.

gitconfig.fsmonitor warns when the global or system git config, or a file it includes, turns core.fsmonitor on for every repository. A repository that uses an fsmonitor hook such as Watchman belongs in exclude, because the shim’s flags override its own core.fsmonitor and core.untrackedCache.

daemons.inotify warns when the user’s inotify watches reach 90% of fs.inotify.max_user_watches.

See Stopping fsmonitor daemons and Which repositories get fsmonitor.

Ref format and old git

gitconfig.ref-format fails when init.defaultRefFormat is not files, or GIT_DEFAULT_REF_FORMAT names another format, and warns when init.defaultRefFormat is unset. drawbar install sets it to files when it is unset, and never sets worktree.useRelativePaths.

repos.relative-worktrees warns when a configured repository sets extensions.relativeWorktrees and a git older than 2.48 is installed as the git in a PATH directory, as /usr/bin/git, or as the real git. Such a git cannot read worktrees created with relative paths.