2019-12-22 23:48:18 +01:00
|
|
|
diff --git a/internal/config/config.go b/internal/config/config.go
|
2021-04-09 00:36:32 +02:00
|
|
|
index 36f8625..72ede08 100644
|
2019-12-22 23:48:18 +01:00
|
|
|
--- a/internal/config/config.go
|
|
|
|
+++ b/internal/config/config.go
|
2021-04-09 00:36:32 +02:00
|
|
|
@@ -12,7 +12,7 @@ import (
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
- configFile = "config.yml"
|
|
|
|
+ configFile = "shell-config.yml"
|
|
|
|
defaultSecretFileName = ".gitlab_shell_secret"
|
|
|
|
)
|
|
|
|
|
|
|
|
@@ -91,7 +91,7 @@ func (c *Config) GetHttpClient() *client.HttpClient {
|
|
|
|
// NewFromDirExternal returns a new config from a given root dir. It also applies defaults appropriate for
|
|
|
|
// gitlab-shell running in an external SSH server.
|
|
|
|
func NewFromDirExternal(dir string) (*Config, error) {
|
|
|
|
- cfg, err := newFromFile(filepath.Join(dir, configFile))
|
|
|
|
+ cfg, err := newFromFile(filepath.Join("/run/gitlab", configFile))
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2019-12-22 23:48:18 +01:00
|
|
|
diff --git a/internal/keyline/key_line.go b/internal/keyline/key_line.go
|
2020-10-22 13:04:51 +02:00
|
|
|
index c6f2422..fb0426b 100644
|
2019-12-22 23:48:18 +01:00
|
|
|
--- a/internal/keyline/key_line.go
|
|
|
|
+++ b/internal/keyline/key_line.go
|
2020-10-22 13:04:51 +02:00
|
|
|
@@ -37,7 +37,7 @@ func NewPrincipalKeyLine(keyId, principal string, config *config.Config) (*KeyLi
|
|
|
|
}
|
|
|
|
|
2019-10-23 22:47:24 +02:00
|
|
|
func (k *KeyLine) ToString() string {
|
2020-09-28 23:42:57 +02:00
|
|
|
- command := fmt.Sprintf("%s %s-%s", path.Join(k.Config.RootDir, executable.BinDir, executable.GitlabShell), k.Prefix, k.Id)
|
2019-10-23 22:47:24 +02:00
|
|
|
+ command := fmt.Sprintf("%s %s-%s", path.Join("/run/current-system/sw/bin", executable.GitlabShell), k.Prefix, k.Id)
|
2020-10-22 13:04:51 +02:00
|
|
|
|
|
|
|
return fmt.Sprintf(`command="%s",%s %s`, command, SshOptions, k.Value)
|
|
|
|
}
|
2019-10-23 22:47:24 +02:00
|
|
|
diff --git a/support/gitlab_config.rb b/support/gitlab_config.rb
|
2019-12-22 23:48:18 +01:00
|
|
|
index 52ac5ee..d96baa3 100644
|
2019-10-23 22:47:24 +02:00
|
|
|
--- a/support/gitlab_config.rb
|
|
|
|
+++ b/support/gitlab_config.rb
|
2019-12-22 23:48:18 +01:00
|
|
|
@@ -7,7 +7,7 @@ class GitlabConfig
|
2019-10-23 22:47:24 +02:00
|
|
|
attr_reader :config
|
|
|
|
|
|
|
|
def initialize
|
|
|
|
- @config = YAML.load_file(File.join(ROOT_PATH, 'config.yml'))
|
|
|
|
+ @config = YAML.load_file('/run/gitlab/shell-config.yml')
|
|
|
|
end
|
|
|
|
|
|
|
|
def auth_file
|