From 1b350f58b4bc58d3930fda4c7aab827aca17f7d0 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sun, 27 Nov 2022 11:13:16 +0100 Subject: [PATCH] fix http token --- crates/octopush_cli/src/commands/execute.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/octopush_cli/src/commands/execute.rs b/crates/octopush_cli/src/commands/execute.rs index b4919af..2b82e34 100644 --- a/crates/octopush_cli/src/commands/execute.rs +++ b/crates/octopush_cli/src/commands/execute.rs @@ -24,6 +24,7 @@ pub fn execute_cmd() -> Command { Arg::new("gitea-http-token") .long("gitea-http-token") .action(ArgAction::Set) + .env("GITEA_HTTP_TOKEN") .required(false), ) } @@ -36,12 +37,10 @@ pub async fn execute_subcommand(args: &ArgMatches) -> eyre::Result<()> { let gitea_http_token = args.get_one::("gitea-http-token"); let service_register = ServiceRegister::new( - LocalGitProviderOptions { - http_auth: gitea_http_token.map(|t| t.clone()), - }, + LocalGitProviderOptions { http_auth: None }, DefaultGiteaClientOptions { url: "https://git.front.kjuulh.io/api/v1".into(), - basicauth: Some("kjuulh:".into()), + basicauth: gitea_http_token.map(|t| t.clone()), }, );