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>()