3 ms·
So, i'm a little confused. Whats the downside of this: curl -O https://github.com/<username>.keys https://github.com/<username>.keys Does Github just want us t
by ctruman 14y ago
So, i'm a little confused. Whats the downside of this:
curl -O https://github.com/<username>.keys https://github.com/<username>.keys
Does Github just want us to use the API Method? http://developer.github.com/v3/users/keys/#list-public-keys-for-a-user http://developer.github.com/v3/users/keys/#list-public-keys-...
- adamstac 14y agoI wasn't sure of that either. I'd prefer to curl it myself.
- ctruman 14y agoWell either way, cool way to retrieve keys.
- colindean 14y agoBut...but...the second way is so much more programatic! ruby -e 'require "json"; require "open-uri"; JSON.parse(open("https://api.github.com/users/<username>/keys https://api.github.com/users/<username>/keys).read).each{|x|puts x["key"]}' Maybe there's something about the .keys URL possibly going away or moving, while the API is pretty much guaranteed to be there for as long as that version of the API works.