mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-21 07:49:34 +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 {
|
func (t *task) installKey(key models.AccessKey) error {
|
||||||
t.log("access key " + key.Name + " installed")
|
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
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
label.control-label.col-sm-4 Public Key
|
label.control-label.col-sm-4 Public Key
|
||||||
.col-sm-6
|
.col-sm-6
|
||||||
textarea.form-control(ng-model="key.key" rows="4")
|
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'")
|
.form-group(ng-if="key.type == 'ssh'")
|
||||||
label.control-label.col-sm-4 Private Key
|
label.control-label.col-sm-4 Private Key
|
||||||
.col-sm-6
|
.col-sm-6
|
||||||
|
Loading…
Reference in New Issue
Block a user