Checkout code does not work anymore

Ran into this similar problem.

How I’ve fixed it, is to set a User Key.

Open the Project → Settings → SSH Keys → User Key.

Pick a user who can read-write to the repository and now it’ll checkout and action as your user. Alternatively, you can log in as a machine / bot user and do the same and it’ll action as that user.