mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-20 23:39:56 +01:00
Added SSH certificate support
This commit is contained in:
parent
44017069df
commit
09dfe7463e
@ -215,8 +215,14 @@ func (t *task) populateDetails() error {
|
||||
|
||||
func (t *task) installKey(key models.AccessKey) error {
|
||||
t.log("access key " + key.Name + " installed")
|
||||
err := ioutil.WriteFile(key.GetPath(), []byte(*key.Secret), 0600)
|
||||
|
||||
var path = key.GetPath()
|
||||
err := ioutil.WriteFile(path, []byte(*key.Secret), 0600)
|
||||
if key.Key != nil {
|
||||
err2 := ioutil.WriteFile(path+"-cert.pub", []byte(*key.Key), 0600)
|
||||
if err2 != nil {
|
||||
return err2
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
label.control-label.col-sm-4 Public Key
|
||||
.col-sm-6
|
||||
textarea.form-control(ng-model="key.key" rows="4")
|
||||
p.help-text Public key is <strong>optional</strong> however you should set it so you can identify your private key by its fingerprint. Private keys are not available for reading later from the UI.
|
||||
p.help-text Public key is <strong>optional</strong> (unless you are using SSH certificates) however you should set it so you can identify your private key by its fingerprint. Private keys are not available for reading later from the UI.
|
||||
.form-group(ng-if="key.type == 'ssh'")
|
||||
label.control-label.col-sm-4 Private Key
|
||||
.col-sm-6
|
||||
@ -56,4 +56,4 @@
|
||||
button.btn.btn-success(ng-click="$close({ key: key })")
|
||||
span(ng-if="!key.id") Create
|
||||
span(ng-if="key.id") Update
|
||||
button.btn.btn-default.pull-left(ng-click="$dismiss()") Dismiss
|
||||
button.btn.btn-default.pull-left(ng-click="$dismiss()") Dismiss
|
||||
|
Loading…
Reference in New Issue
Block a user