(repo *git.Repository)
| 39 | } |
| 40 | |
| 41 | func (c *Config) ensureAdminRSAKey(repo *git.Repository) error { |
| 42 | return repo.UpdateFile("ssh/id_rsa", func(data []byte) ([]byte, error) { |
| 43 | if data != nil { |
| 44 | return data, nil |
| 45 | } |
| 46 | |
| 47 | pk, err := models.GenerateRSAPrivateKey() |
| 48 | if err != nil { |
| 49 | return nil, err |
| 50 | } |
| 51 | |
| 52 | return pk.MarshalPrivateKey() |
| 53 | }) |
| 54 | } |
| 55 | |
| 56 | func (c *Config) loadAdminConfig(adminRepo *git.Repository) error { |
| 57 | configData, err := adminRepo.GetFile("config.yml") |
no test coverage detected