云工程师你好,
我正试图在azure中创建一个自托管代理,通过构建和发布管道运行。当我将linux虚拟机配置为代理时,我得到以下错误。
--------OS Information--------
NAME="SLES"
VERSION="15-SP2"
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP2"
___ ______ _ _ _
/ _ | ___ (_) | (_)
/ /_ _____ _ _ __ ___ | |_/ /_ _ __ ___| |_ _ __ ___ ___
| _ |_ / | | | '__/ _ | __/| | '_ / _ | | '_ / _ / __|
| | | |/ /| |_| | | | __/ | | | | |_) | __/ | | | | | __/__
_| |_/___|__,_|_| ___| _| |_| .__/ ___|_|_|_| |_|___||___/
| |
agent v2.183.1 |_| (commit b8617e6)
>> End User License Agreements:
Building sources from a TFVC repository requires accepting the Team Explorer Everywhere End User License Agreement. This step is not required for building sources from Git repositories.
A copy of the Team Explorer Everywhere license agreement can be found at:
/home/selfhosted-linuxagent/externals/tee/license.html
Enter (Y/N) Accept the Team Explorer Everywhere license agreement now? (press enter for N) > y
>> Connect:
Enter server URL > https://hello.world.com/
Enter authentication type (press enter for PAT) >
Enter personal access token > *****************
Error reported in diagnostic logs. Please examine the log for more details.
- /home/selfhosted-linuxagent/_diag/Agent_20210308-094413-utc.log
The SSL connection could not be established, see inner exception.
Failed to connect. Try again or ctrl-c to quit
Enter server URL >
该错误可能表明您在TFS服务器上使用的服务器证书不受构建机器的信任。请确保将自签名ssl服务器证书安装到操作系统证书存储库中。
Windows: Windows certificate store
Linux: OpenSSL certificate store
macOS: OpenSSL certificate store for agent version 2.124.0 or below
Keychain for agent version 2.125.0 or above
您可以通过运行几个命令轻松地验证证书是否已正确安装。只要SSL握手正确完成,即使您收到请求的401,您也应该很好。
Windows: PowerShell Invoke-WebRequest -Uri https://corp.tfs.com/tfs -UseDefaultCredentials
Linux: curl -v https://corp.tfs.com/tfs
macOS: curl -v https://corp.tfs.com/tfs (agent version 2.124.0 or below, curl needs to be built for OpenSSL)
curl -v https://corp.tfs.com/tfs (agent version 2.125.0 or above, curl needs to be built for Secure Transport)
查看以下文档了解更多详细信息:
https://learn.microsoft.com/en us/azure/devops/pipelines/agents/certificate?view=azure - devops - 2020