我使用Team Foundation Server(TFS)VCS根與代理端簽出了TeamCity生成配置。它成功連接到TFS並獲取存儲庫。 TFS帳戶啓用了備用憑據,並且VCS根成功使用這些憑據。當工作區命令工作時,爲什麼TFS歷史命令返回「TF30063:您無權訪問...」
在構建配置中,我有一個使用tf.exe
發出TFS命令的Powershell runner步驟。
的第一個命令:
& "$tfExe" workspaces
執行所成功返回工作區信息($ tfExe設置爲tf.exe路徑)。
獲取庫的歷史與:
& "$tfExe" history . /noprompt /recursive /stopafter:1 /format:detailed
返回消息:
TF30063: You are not authorized to access https://{projectName}.visualstudio.com/DefaultCollection.
我曾嘗試與不/login
參數如下history命令:
& "$tfExe" history . /noprompt /recursive /stopafter:1 /format:detailed /login:"$usernameAndPassword"
其中我嘗試將$usernameAndPassword
設置爲「## Live ## \ AltUserName,Password」和「AltUserName,Password」,但都返回了相同的錯誤。
爲什麼tf.exe可以用於工作區命令,但不能用於歷史命令,以及我使用憑據調用歷史命令的方式有什麼問題(請記住,這些憑證與所用憑據相同由TeamCity中的VCS根目錄)?
是否錯誤顯示運行「和‘$ tfExe’工作區/collection:https://{projectName}.visualstudio.com/DefaultCollection」命令? –