-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathnitrous_github_action.rb
More file actions
15 lines (13 loc) · 2.09 KB
/
nitrous_github_action.rb
File metadata and controls
15 lines (13 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'github_api'
require 'io/console'
# Bypass annoying deprecation warning between the
# github_api gem and the faraday gem
Faraday::Builder = Faraday::RackBuilder
print "Github Username: "
user_name = gets.strip
print "Github Password (nothing will be displayed):"
password = STDIN.noecho(&:gets).strip
github = Github.new(:login => user_name, :password => password)
github.users.keys.create("title" => "FirehoseNitrous",
"key"=> File.open("/home/action/.ssh/id_rsa.pub").read)
puts "\nok!"