tf.exe
utilitytf.exe vc workspaces /collection:[Azure collection address]
/login
switch. But this seems to make no difference to the workspaces
commandThis problem can be temporarily resolved by:
tf.exe vc workspaces /collection:[Azure collection address]
What needs to be done to persist the authentication within the pipeline (or Powershell script) so the account information does not need to be manually reentered?
By default the Visual Studio will cache the credentials automatically. And if we want to change the login credentials information, we need to clear the caches and re-enter the new credentials.
You could also refer to this ticket to clean the credentials
You can have a try using the System.accesstoken
to login in the build pipeline by specifying the /loginType:OAuth
. See below example:
tf.exe workspaces /collection:https://collection.visualstudio.com/ /loginType:OAuth /login:.,$(System.AccessToken) /noprompt
In order to access the System.accesstoken
in your pipeline. You need to edit your pipeline and click on the agent job node where the command line task will be running under then select ”Allow scripts to access the OAuth token”. See here for more information.
Please also check out this similar thread.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.