mirror of
https://gitea.com/gitea/tea.git
synced 2026-02-22 06:13:32 +01:00
fix: authentication via env variables repo argument (#809)
--------- Co-authored-by: techknowlogick <techknowlogick@gitea.com> Reviewed-on: https://gitea.com/gitea/tea/pulls/809 Co-authored-by: Nikolaos Karaolidis <nick@karaolidis.com> Co-committed-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
committed by
techknowlogick
parent
fab70f83c1
commit
e3c550ff22
@@ -18,6 +18,7 @@ func GetLoginByEnvVar() *config.Login {
|
||||
giteaToken := os.Getenv("GITEA_TOKEN")
|
||||
githubToken := os.Getenv("GH_TOKEN")
|
||||
giteaInstanceURL := os.Getenv("GITEA_INSTANCE_URL")
|
||||
giteaInstanceSSHHost := os.Getenv("GITEA_INSTANCE_SSH_HOST")
|
||||
instanceInsecure := os.Getenv("GITEA_INSTANCE_INSECURE")
|
||||
insecure := false
|
||||
if len(instanceInsecure) > 0 {
|
||||
@@ -38,6 +39,7 @@ func GetLoginByEnvVar() *config.Login {
|
||||
Name: "GITEA_LOGIN_VIA_ENV",
|
||||
URL: giteaInstanceURL,
|
||||
Token: token,
|
||||
SSHHost: giteaInstanceSSHHost,
|
||||
Insecure: insecure,
|
||||
SSHKey: "",
|
||||
SSHCertPrincipal: "",
|
||||
|
||||
Reference in New Issue
Block a user