Your hint says that the "HTTPS private key has been forgotten in Git." This could mean several things, but **I suspect it means that the private key was added and deleted from Git history,** which in turn means _you can get it back._

## Hunt for it

If the Git history is **short** (and it might be, in an assignment like this), you can just `git log --oneline --stat`, <kbd>Ctrl</kbd>+<kbd>D</kbd> until you find the right commit, and `git show` it.

If the Git history is **long,** you can try fancier things to hunt for it, like

- `git log --all --` with a file filter.

    Since your `ps aux` output says "`--key=/root//key.pem`," maybe look for `key.pem`.

- `git log --all -i --pickaxe-regex -S` with some text to look for in the diff.<sup>1</sup>

    This runs faster than the next command, but needs the count of the searched text to change in a commit. (Most of the time, that just means it ignores boring refactors.)

- `git log --all -i -G` with some text to look for in the diff.<sup>1</sup>

    This runs slower than the previous command because it requires two passes through the history, but it checks for the text in every commit.

## Lesson

If you or someone on your team puts secret data into Git, you can't just `git rm` it away. Its content stays there in the history _forever._ You need to use a tool like `git filter-repo` or `git filter-branch` to get rid of it, and _everyone_ with a clone of the repo who has `fetch`ed it since the secret was introduced needs to fix theirs, too. This might mean throwing their repo away and cloning a fresh copy.

<sub><sup>1</sup> Text like `-----BEGIN` or `"PRIVATE KEY"`.</sub>