11/18 2010

Migrating Github Projects to HTTPS

Github now has an HTTPS repository URL for every project, and you should definitely use it. You don’t have to manage SSH keys, just store your password in plain text1 in your home directory.

Once per machine, put this in your ~/.netrc file:

For each repo, do this:

And that’s basically it.

Footnotes

1: Github crew, can we get a way to use our API token or some other revokable token as a password for HTTPS repo operations? I appreciate that anything involving “revokable tokens” is really hard to make a decent UI for, but it just feels bad keeping that in my .netrc file.