Я пытаюсь установить http.extraheader
для получения учетных данных в Azure Devops конвейере, установив http.extraheader="AUTHORIZATION: bearer $ENV{System_AccessToken}"
. Рассмотрим следующий фрагмент:
# For CI we need to set the AUTHORIZATION for git clones
if(DEFINED ENV{System_AccessToken})
set(GIT_CONFIG_EXTRA_HEADER "AUTHORIZATION: bearer $ENV{System_AccessToken}" CACHE STRING "")
endif()
# Fetch the toolbox
include(FetchContent)
FetchContent_Declare(toolbox
GIT_REPOSITORY https://repo/toolbox
GIT_CONFIG http.extraheader=${GIT_CONFIG_EXTRA_HEADER}
)
Это работает на Windows, но на Linux Я получаю следующую ошибку:
[1/9] Creating directories for 'toolbox-populate'
[1/9] Performing download step (git clone) for 'toolbox-populate'
Cloning into 'toolbox-src'...
error: key does not contain a section: AUTHORIZATION:
fatal: unable to write parameters to config file
Итак, по сути, строка в ${GIT_CONFIG_EXTRA_HEADER}
не правильно указан, я думаю, но я не могу понять, что делать.
Похоже, ошибка в CMake. Я подал выпуск .