所以我有一个构建配置,它已经配置了命令行的构建步骤。在此我设置了一个环境参数MATCH_PASSWORD并且值是正确的密码,它是生成并作为访问密钥存储在 bitbucket 中的。
由于当我运行命令以在快速通道文件中执行通道时,密钥已本地存在于我的机器上。没有错误。但是,当我推送我的分支时,TeamCity 正在编译,一旦它执行通道并尝试克隆 repo,就会输出以下错误消息并循环到日志中。
[10:09:43][Step 1/1] [10:09:43]: Cloning remote git repo...
[10:09:43][Step 1/1] [10:09:43]: If cloning the repo takes too long, you can use the `clone_branch_directly` option in match.
[10:09:46][Step 1/1] [10:09:45]: Neither the MATCH_PASSWORD environment variable nor the local keychain contained a password.
[10:09:46][Step 1/1] [10:09:45]: Bailing out instead of asking for a password, since this is non-interactive mode.
[10:09:46][Step 1/1] [10:09:45]: Couldn't decrypt the repo, please make sure you enter the right password!
[10:09:46][Step 1/1] security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
我有点困惑,因为我已经在 teamcity 中设置了环境变量,它应该识别它,拿起它并将它设置在代理上。