overthewire.bandit.lvl[31-32]
Level Goal
There is a git repository at ssh://bandit31-git@localhost/home/bandit31-git/repo. The password for the user bandit31-git is the same as for the user bandit31.
Clone the repository and find the password for the next level.
Solution
as with the previous overthewire’s bandit git related challenges, i start by cat(1)ing the README.md file.

we can see from the output that we are required to add a new file with a specific name and content, the remote server seems to have a pre-receive hook to validate the file and prevent adding the commit to the remote repository if the conditions are not met.
when i created the file key.txt with thre required content and then tried to add it to the staging area, i got a warning message that all files with the .txt extension are ignored by a role in the .gitignore file.
the nice thing about git is it’s helpful messages, here we can see that we can forcibly add the file to the staging area without editing the .gitignore file.

now adding the file to the staging area, commiting and then pushing to the master branch on the remote server we will be rewarded with next level’s password as a result and we are done!.
