OverTheWire Bandit Level 29 → 30 tutorial!!
Login
Log in as bandit29 using the password you obtained from Level 28 → 29.
ssh bandit29@bandit.labs.overthewire.org -p 2220
# password: 4pT1t5DENaYuqnqvadYs1oE4QLCdjmJ7
Why? Each Bandit level is a separate UNIX user. To solve 29 → 30, you must be the
bandit29user.
Task

There is a git repository at
ssh://bandit29-git@localhost:2220/home/bandit29-git/repo
The password for bandit29-git is the same as for bandit29.
Clone the repo and find the password for bandit30.
A little bit of Theory
- Git projects can use branches. Production code typically lives on
master, while work-in-progress lives on branches likedev. - Use
git branch -ato list local and remote branches. - Switch with
git checkout <branch>(orgit switch <branch>). - Secrets are often left in non-master branches (e.g.,
dev).
Further reading:
Solution
-
Clone the repository into a writable temp dir
WORKDIR=$(mktemp -d) cd "$WORKDIR" git clone ssh://bandit29-git@localhost:2220/home/bandit29-git/repo "repo-$RANDOM" cd repo-*Why?
/tmpis writable. When prompted forbandit29-git@localhost’s password, use your bandit29 password.
-
List what’s in the repo (on master)
ls -la cat README.mdWhy? A quick peek shows the hint: the master README usually says something like “no passwords in production!”, nudging us toward another branch.

-
Check what branches exist
git branch -aWhy? We expect additional remote branches (e.g.,
origin/dev, maybeorigin/sploits-dev) that may contain the secret.
-
Switch to the
devbranchgit checkout dev # or: git switch devWhy? The README on
mastersaid “no passwords in production,” hinting the dev branch holds it.
-
Read the README on
devcat README.mdWhy? The credentials for the next level are stored right in the development branch’s README.

Password
This is the password I got for bandit30 (from the
devbranch README):
qp30ex3VLz5MDG1n91YowTv4Q8l7CDZL
Troubleshooting
- “Permission denied (publickey)” → Make sure you used
ssh://bandit29-git@localhost:2220/...and typed the bandit29 password at the prompt. - No dev branch? → Run
git fetch --allthengit branch -aagain. - Detached HEAD or mistakes →
git switch -jumps back to the previous branch;git statusshows where you are.
Congrats 🎉 You explored git branches and dug the secret out of the dev branch. On to bandit30!
Thanks for reading!
Until next time — Otsumachi!! 💖☄️✨
