microsoft / vso-agent

Visual Studio Team Services and TFS agent for Mac OSX and Linux
MIT License
131 stars 56 forks source link

Credentials on cloning git submodules #310

Closed WebDucer closed 7 years ago

WebDucer commented 8 years ago

We use in our projects submodules to bind some libraries. If we check Checkout submodules in Repository tab, we get the following error during the workspace preparation step:

******************************************************************************

Preparing tasks

******************************************************************************

******************************************************************************

Running prepareWorkspace

******************************************************************************
preparing Workspace
cwd: /Users/********/nodeTfsAgent/_work
Repository type: TfsGit
using source provider: tfsgit
loading: /Users/********/nodeTfsAgent/agent/scm/tfsgit
Using cfgcreds
running incremental
getting code
http://tfsmaster:8080/tfs/Android/_git/Repo1
srcVersion: 9fb78a4eb0ce3ca6dfd21d53a74d77da4beb4406
srcBranch: refs/heads/develop
Using ref: 9fb78a4eb0ce3ca6dfd21d53a74d77da4beb4406
HEAD is now at 9fb78a4... Commit 1

D   LibrarySubmodule

Updating Submodules
Cloning into 'LibrarySubmodule'...

fatal: could not read Username for 'http://tfsmaster:8080': Device not configured
fatal: clone of 'http://tfsmaster:8080/tfs/Android/_git/Repo1' into submodule path 'LibrarySubmodule' failed

/usr/local/bin/git failed with return code: 128

The submodule is on TFS in the same team collection but in own team project. The agent can checkout and build the submodule repository without problems. But it can not checkout them as submodule.

WebDucer commented 8 years ago

I found a work around by storing the agent git creadentials in osx key chain in system path and allow access for git-credential-osxkeychain.

bryanmacfarlane commented 8 years ago

Yes, that is the workaround. vsts-agent has support and yes, I know you have an outstanding issue with that one. Next preview for that is a day or two (hopefully) away which also adds http proxy debugging so we can get to the bottom of that.

bryanmacfarlane commented 7 years ago

vsts-agent now has support for this and proxy debugging. If you're having an issue with the vsts-agent, create an issue on that side.