I have just setup a new repo on GitHub and added a .NET Core solution. I have create a Personal Access Token in GitHub.
In Visual Studio Team Services online, I've set the "Get sources" to use GitHub and chose to use my PAT, pasted the token string in. It lights up green to indicate a connection was established and indeed I am able to pick the repo I need.
The build on the hosted cloud agent fails though:
2018-02-01T12:56:18.3505619Z ##[section]Starting: Get Sources
2018-02-01T12:56:18.5131672Z Syncing repository: lukepuplett/standard-extensions (GitHub)
2018-02-01T12:56:18.5218130Z Prepending Path environment variable with directory containing 'git.exe'.
2018-02-01T12:56:18.9399524Z ##[command]git version
2018-02-01T12:56:20.4345074Z git version 2.14.3.windows.1
2018-02-01T12:56:20.4697423Z ##[command]git lfs version
2018-02-01T12:56:27.9772252Z git-lfs/2.3.4 (GitHub; windows amd64; go 1.8.3; git d2f6752f)
2018-02-01T12:56:28.0252003Z ##[command]git init "d:\a\1\s"
2018-02-01T12:56:28.9023657Z Initialized empty Git repository in d:/a/1/s/.git/
2018-02-01T12:56:28.9083315Z ##[command]git remote add origin https://github.com/lukepuplett/standard-extensions.git
2018-02-01T12:56:29.1145696Z ##[command]git config gc.auto 0
2018-02-01T12:56:29.3007766Z ##[command]git config --get-all http.https://github.com/lukepuplett/standard-extensions.git.extraheader
2018-02-01T12:56:29.3334527Z ##[command]git config --get-all http.proxy
2018-02-01T12:56:29.3767712Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ********" fetch --tags --prune --progress --no-recurse-submodules origin
2018-02-01T12:56:37.4510516Z fatal: could not read Username for 'https://github.com': terminal prompts disabled
2018-02-01T12:56:39.5779857Z ##[error]Git fetch failed with exit code: 128
2018-02-01T12:56:39.6331761Z ##[section]Finishing: Get Sources
I was expecting this to just work, especially given that the build definition editor UI lights up okay.
I just ran the build a couple of times so I could see any events logged in the Security bit over on GitHub but nothing it mentioned, which is odd.
Note: I have 2FA setup.
Has anyone got this out-of-box feature working from VSTS?