1
我有維護作業中詹金斯我的Git倉庫(混帳上TFS在線)刪除遠程分支刪除不符合特定條件或陳舊的分支的分支。運行作業時就這樣說:從詹金斯工作
Going to remove branch development/Batch_R7
fatal: InvalidOperationException encountered.
Showing a modal dialog box or form when the application is not running in
UserInteractive mode is not a valid operation. Specify the ServiceNotification
or DefaultDesktopOnly style to display a notification from a service
application.
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://everisidbtfs.visualstudio.com': No
error
我跑從Powershell的腳本命令。
其他Git命令在該Powershell腳本中正常工作,例如獲取分支列表。
如果我從Jenkins服務器(或任何其他機器)的Powershell命令行運行PowerShell腳本,它可以正常工作。
TFS用戶有權刪除遙控器,並向Jenkins作業提供憑證。
這是我使用刪除分支Git的命令:
git push --porcelain --progress --recurse-submodules=check origin :refs/heads/<branch_name>
對此有什麼解決辦法?我究竟做錯了什麼?因爲git命令是一個「寫入」操作(push),所以Jenkins可能會有一些安全限制來做到這一點...我在自動化腳本中使用的其他git命令是「只讀」的。
嗚嗚......我有Windows Credential Store安裝和Credential插件,但由於Jenkins正在使用SYSTEM帳戶運行(因爲它默認情況下是作爲Windows服務運行的),我認爲問題與此有關......爲我的Windows管理員用戶。我會看看它,讓你知道!如果可能,我想避免與SYSTEM用戶混淆:)非常感謝! – Luis
以我的憑據存儲的常規用戶身份啓動Jenkins服務可以正常工作。 – Luis