[JENKINS-21016] Check for exceptions thrown in finally while deleting gitcredentials