Restarting workspace does it lost connection to heroku?



I was getting error like
fatal: failed to read object c66b131c5a6f8fb9346994bb53de51157a27ae87: Structure needs cleaning
so I restarted my workspace, which fixed above issue. But I could not access heroku from my existing package. all other configuration remains unchanged. why I needed to generate SHA key and add it to heroku again? I am worried about future if i faced same issue.

Please explain me what can cause if I restart my workspace?