Last active
December 14, 2016 07:53
-
-
Save MacoTasu/0f40c86e47f14cc5310576be3f2e46f4 to your computer and use it in GitHub Desktop.
githubに登録しているpubkeyをauthrized_keysにひたすら入れる君
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require 'net/http' | |
require 'fileutils' | |
users = ["MacoTasu"] #ここにユーザを追加してね | |
users.each do |user| | |
uri = URI.parse("https://github.com/#{user}.keys") | |
File.open('authrized_keys','a') do |file| | |
Net::HTTP.get(uri).split("\n").each do |key| | |
file.puts("#{key}") | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment