Previous Level: Level 29
ssh email@example.com -p 2220
There is a git repository at ssh://bandit29-git@localhost/home/bandit29-git/repo. The password for the user bandit29-git is the same as for the user bandit29.
Clone the repository and find the password for the next level.
A little bit of Theory
Git branching is another feature of the version control system. It allows you to split the development into different branches. Specifically, there is a master branch from which the software can be taken and it can be separately worked on. You can change and add features while still maintaining a working master branch. Once the work is done, it can be integrated into the master branch again. This allows for additional version control. You can offer a production branch with usable software, while fixing bugs or adding features in a different development branch.
The basic commands for working with branches are:
git branch: List (
-a), create, or delete branches
git checkout <branch_name>/git switch <branch_name>: Switch branches
git merge: Join two or more branches
We start the same way as in the two previous level. We create a folder, clone the git repository and check its content. Since there is only a README.md we check its contents.
The sentence ’no passwords in production!’ sounds like there might be more branches. So we check out, if this is the case.
And we were correct. We got a list of branches of this repository. Now, the most interesting one based on the description in ‘README’ would be the ‘dev’ branch. Since if the password is not in the production branch, it is most likely in the development branch.
To test that theory, we can switch to this branch and check its content.
And again, the assumption was correct. The ‘dev’ branch contains the password in the ‘README’ file.
Next Level: Level 31