{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/659","repository_url":"https://api.github.com/repos/Microsoft/vsts-agent","labels_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/659/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/659/comments","events_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/659/events","html_url":"https://github.com/Microsoft/vsts-agent/issues/659","id":185318226,"number":659,"title":"VSTS OAUTH Login Window appears during Gated Check-In Builds On Agent 2.108.0","user":{"login":"andrewtechhelp","id":3512118,"avatar_url":"https://avatars.githubusercontent.com/u/3512118?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewtechhelp","html_url":"https://github.com/andrewtechhelp","followers_url":"https://api.github.com/users/andrewtechhelp/followers","following_url":"https://api.github.com/users/andrewtechhelp/following{/other_user}","gists_url":"https://api.github.com/users/andrewtechhelp/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewtechhelp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewtechhelp/subscriptions","organizations_url":"https://api.github.com/users/andrewtechhelp/orgs","repos_url":"https://api.github.com/users/andrewtechhelp/repos","events_url":"https://api.github.com/users/andrewtechhelp/events{/privacy}","received_events_url":"https://api.github.com/users/andrewtechhelp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ericsciple","id":12102068,"avatar_url":"https://avatars.githubusercontent.com/u/12102068?v=3","gravatar_id":"","url":"https://api.github.com/users/ericsciple","html_url":"https://github.com/ericsciple","followers_url":"https://api.github.com/users/ericsciple/followers","following_url":"https://api.github.com/users/ericsciple/following{/other_user}","gists_url":"https://api.github.com/users/ericsciple/gists{/gist_id}","starred_url":"https://api.github.com/users/ericsciple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericsciple/subscriptions","organizations_url":"https://api.github.com/users/ericsciple/orgs","repos_url":"https://api.github.com/users/ericsciple/repos","events_url":"https://api.github.com/users/ericsciple/events{/privacy}","received_events_url":"https://api.github.com/users/ericsciple/received_events","type":"User","site_admin":false},"assignees":[{"login":"ericsciple","id":12102068,"avatar_url":"https://avatars.githubusercontent.com/u/12102068?v=3","gravatar_id":"","url":"https://api.github.com/users/ericsciple","html_url":"https://github.com/ericsciple","followers_url":"https://api.github.com/users/ericsciple/followers","following_url":"https://api.github.com/users/ericsciple/following{/other_user}","gists_url":"https://api.github.com/users/ericsciple/gists{/gist_id}","starred_url":"https://api.github.com/users/ericsciple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericsciple/subscriptions","organizations_url":"https://api.github.com/users/ericsciple/orgs","repos_url":"https://api.github.com/users/ericsciple/repos","events_url":"https://api.github.com/users/ericsciple/events{/privacy}","received_events_url":"https://api.github.com/users/ericsciple/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2016-10-26T07:38:11Z","updated_at":"2016-10-27T05:43:31Z","closed_at":null,"body":"## **Agent version and platform**\r\nVersion of your agent? 2.108.0\r\n<br>\r\nOS of the machine running the agent? Mac OS X 10.11.6\r\n<br>\r\n## **VSTS type and version**\r\nVisualStudio.com or On-Prem TFS? Visual Studio Team Services\r\n<br>\r\nIf VisualStudio.com, what is your account name? Rather not disclose publicly\r\n<br>\r\n## **What's not working?** \r\nWe were having problems with Issue #559 and were looking forward to version 2.108.0 of the agent fixing the issue (may have been technically fixed in 2.107.2, but our agents automatically went from 2.107.0 to 2.108.0)\r\n\r\nHowever, it appears that the fix to that issue has introduced a new issue for us. During gated check in builds, when clean workspace is set to false (which is what we want to save downloading everything every time), an OAUTH window pops up asking to log into Visual Studio Team Services, blocking the build from commencing until it is closed. Closing this dialog produces the following message in the build log.\r\n\r\n```\r\nCleaning last saved checkin metadata.\r\nFailed to retrieve credentials interactively.  Check the program log files for details. To bypass web browser based interactive authentication, please set the TF_BYPASS_BROWSER_LOGIN environment variable to true. \r\nDefault credentials are unavailable because no Kerberos ticket or other authentication token is available.\r\nA client error occurred: Authentication credentials were not explicitly provided and could not be determined from any workspace, or argument paths provided.  Use the workspace or login option (if the noprompt option is specified, the login option value must contain the username, domain, and password).\r\nUsername: \r\n##[warning]Unable to clean last-saved-checkin-metadata. Exit code 100 returned from process: file name 'tf', arguments 'add /Agents/Agent2/_work/24/s/__tf_clean_wksp_metadata'.\r\n##[command]tf undo -recursive /Agents/Agent2/_work/24/s/__tf_clean_wksp_metadata -jwt:******** -noprompt\r\nNo pending changes were found for /Agents/Agent2/_work/24/s/__tf_clean_wksp_metadata.\r\n##[warning]Unable to undo '/Agents/Agent2/_work/24/s/__tf_clean_wksp_metadata'. Exit code 100 returned from process: file name 'tf', arguments 'undo -recursive /Agents/Agent2/_work/24/s/__tf_clean_wksp_metadata -jwt:******** -noprompt'.\r\n```\r\n\r\nFollowing the advice there around setting the TF_BYPASS_BROWSER_LOGIN to false works in that it stops the blocking OAUTH dialog appearing and now the build does continue and succeeds, but still with problems issue #559 was trying to fix (lots of work item links being created for that changes). The build log ends up very similar to the one above, but just slightly different.\r\n\r\n```\r\nCleaning last saved checkin metadata.\r\nDefault credentials are unavailable because no Kerberos ticket or other authentication token is available.\r\nA client error occurred: Authentication credentials were not explicitly provided and could not be determined from any workspace, or argument paths provided.  Use the workspace or login option (if the noprompt option is specified, the login option value must contain the username, domain, and password).\r\nUsername: \r\n##[warning]Unable to clean last-saved-checkin-metadata. Exit code 100 returned from process: file name 'tf', arguments 'add /Agents/Agent2/_work/24/s/__tf_clean_wksp_metadata'.\r\n##[command]tf undo -recursive /Agents/Agent2/_work/24/s/__tf_clean_wksp_metadata -jwt:******** -noprompt\r\nNo pending changes were found for /Agents/Agent2/_work/24/s/__tf_clean_wksp_metadata.\r\n##[warning]Unable to undo '/Agents/Agent2/_work/24/s/__tf_clean_wksp_metadata'. Exit code 100 returned from process: file name 'tf', arguments 'undo -recursive /Agents/Agent2/_work/24/s/__tf_clean_wksp_metadata -jwt:******** -noprompt'.\r\n```\r\n\r\nI can avoid all this by setting the Clean to true on the repository tab of the build definition in VSTS, but that's not a great long term solution as we're now downloading the entire codebase every check-in. There's never been login issues like this before, other than for this new \"Cleaning last saved checkin metadata\" step. \r\n\r\nAny solutions for this issue?"},"comment":{"url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/comments/256551736","html_url":"https://github.com/Microsoft/vsts-agent/issues/659#issuecomment-256551736","issue_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/659","id":256551736,"user":{"login":"ericsciple","id":12102068,"avatar_url":"https://avatars.githubusercontent.com/u/12102068?v=3","gravatar_id":"","url":"https://api.github.com/users/ericsciple","html_url":"https://github.com/ericsciple","followers_url":"https://api.github.com/users/ericsciple/followers","following_url":"https://api.github.com/users/ericsciple/following{/other_user}","gists_url":"https://api.github.com/users/ericsciple/gists{/gist_id}","starred_url":"https://api.github.com/users/ericsciple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericsciple/subscriptions","organizations_url":"https://api.github.com/users/ericsciple/orgs","repos_url":"https://api.github.com/users/ericsciple/repos","events_url":"https://api.github.com/users/ericsciple/events{/privacy}","received_events_url":"https://api.github.com/users/ericsciple/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T05:43:31Z","updated_at":"2016-10-27T05:43:31Z","body":"It sounds like on OSX/Linux (uses TEE CLC), the login parameters are requried for the `tf add` cmd. I'm not sure why I didn't hit this when I tested using my vsts account.\r\n\r\n@andrewtechhelp can you verify the workspace is a local worskpace and not a server workspace. If you send me (ersciple) one of the build logs with system.debug=true, I can skim through the log (at microsoft.com)."}}
{"actor":{"display_login":"ericsciple"}}