Class: Plus4uCodebase::Gitolite
- Inherits:
-
Object
- Object
- Plus4uCodebase::Gitolite
- Defined in:
- lib/plus4u_codebase/gitolite.rb
Class Method Summary collapse
-
.set_server_ssh_key(hub_or_repositroy_uri, params = {}) ⇒ void
Sets server private ssh key.
Instance Method Summary collapse
-
#initialize(session, options = nil) ⇒ Gitolite
constructor
Creates a new instance of
Gitolite
. -
#set_server_ssh_key(hub_or_repositroy_uri, params = {}) ⇒ void
Sets server private ssh key.
Constructor Details
#initialize(session, options = nil) ⇒ Gitolite
Creates a new instance of Gitolite
.
11 12 13 |
# File 'lib/plus4u_codebase/gitolite.rb', line 11 def initialize(session, = nil) @cmd = UU::OS::CMD::CommandClient.new("plus4u-codebase", session, ) end |
Class Method Details
.set_server_ssh_key(hub_or_repositroy_uri, params = {}) ⇒ void
This method returns an undefined value.
Sets server private ssh key. Key is used to ssh access to gitolite server.
49 50 51 52 |
# File 'lib/plus4u_codebase/gitolite.rb', line 49 def self.set_server_ssh_key(hub_or_repositroy_uri, params = {}) session = UU::OS::Security::Session.current_session self.new(session).set_server_ssh_key(hub_or_repositroy_uri, params) end |
Instance Method Details
#set_server_ssh_key(hub_or_repositroy_uri, params = {}) ⇒ void
This method returns an undefined value.
Sets server private ssh key. Key is used to ssh access to gitolite server.
28 29 30 31 32 33 |
# File 'lib/plus4u_codebase/gitolite.rb', line 28 def set_server_ssh_key(hub_or_repositroy_uri, params = {}) if params.nil? || params[:key].nil? || params[:key].empty? raise "Private key can not be empty." end return @cmd.invoke('Gitolite/setServerSshKey', hub_or_repositroy_uri, parameters: {sshKey: params[:key]}) end |