I’ve shared a cookbook for creation and management of deploy keys on public VCSs.
It has providers for Github and Bitbucket and supports creating and deleting key pairs from the disk, uploading the public key to the repository and removing it from there.
The code is still a bit rough, but it works (I haven’t tested OAuth yet, so if you want to help with that please be welcome).
It’s heavily based on this cookbook: https://github.com/zippykid/chef-github-deploy-key — thank you, I know you’re here somewhere.
Issues, pull requests, comments, criticisms are all welcome.