From 20676c126392493fd21f36292b72c5e9dc7d505d Mon Sep 17 00:00:00 2001 From: yaoxuwan Date: Mon, 3 Apr 2023 11:44:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8F=92=E4=BB=B6=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E3=80=81=E4=B8=8B=E8=BD=BD=E9=80=82=E9=85=8D=E5=88=B6=E5=93=81?= =?UTF-8?q?=E5=BA=93=E5=85=A8=E7=90=83=E5=8C=96=20#8560?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tencent/devops/common/archive/client/BkRepoClient.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backend/ci/core/common/common-archive/src/main/kotlin/com/tencent/devops/common/archive/client/BkRepoClient.kt b/src/backend/ci/core/common/common-archive/src/main/kotlin/com/tencent/devops/common/archive/client/BkRepoClient.kt index 6a494a2e8bb..8909483080d 100644 --- a/src/backend/ci/core/common/common-archive/src/main/kotlin/com/tencent/devops/common/archive/client/BkRepoClient.kt +++ b/src/backend/ci/core/common/common-archive/src/main/kotlin/com/tencent/devops/common/archive/client/BkRepoClient.kt @@ -1132,7 +1132,9 @@ class BkRepoClient constructor( setting = ReplicaSetting(conflictStrategy = ConflictStrategy.OVERWRITE), remoteClusterIds = emptySet() ) + val devopsToken = EnvironmentUtil.gatewayDevopsToken() val request = Request.Builder().url(url).header(BK_REPO_UID, userId) + .let { if (null == devopsToken) it else it.header("X-DEVOPS-TOKEN", devopsToken) } .post(taskCreateRequest.toJsonString().toRequestBody(JSON_MEDIA_TYPE)) .build() doRequest(request).resolveResponse>()