question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use git lfs with hosted agents

See original GitHub issue

I use git lfs to store the large files of my repo. I then try to build this repo with hosted agents. My build is pretty simple. It has a single task: Execute PowerShell. In the invoked script, the first thing that I want to do is to fetch my lfs dependencies. I therefore have the following in my script:

& git lfs fetch

Unfortunately, my build fails with the following error:

2016-03-04T19:49:05.7021988Z ##[error]git: 'lfs' is not a git command. See 'git --help'.
2016-03-04T19:49:05.7031986Z ##[error]Did you mean this?
2016-03-04T19:49:05.7041987Z ##[error]  flow

Since I can’t install anything on hosted agents, how am I supposed to have git lfs available?

Then, once it will be available, I expect to have another problem… how to use the oauth token from the SYSTEM_ACCESSTOKEN environment variable. Issue #962 talks about the oauth token problem but the solution is not clear.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mabeadcommented, Mar 8, 2016

See here and here to see how I was able to make git lfs work with VSTS hosted agents.

0reactions
pascalbergercommented, Mar 7, 2016

@mabead Your url looks wrong. Should be https://xyz.visualstudio.com/DefaultCollection/xyz/_git/GitSandbox

Read more comments on GitHub >

github_iconTop Results From Across the Web

git lfs on self hosted agent does not seem to work
Hi,. we are using git lfs on a self hosted agent, using a yaml scripting: The head of the file is like seen...
Read more >
How to use git lfs with Visual Studio Team Services hosted ...
I use git lfs to store the large files of my git repo. I then try to build this repo with hosted agents....
Read more >
Work with large files in your Git repo - Azure - Microsoft Learn
Git LFS is an extension to Git which commits data describing the large files in a commit to your repo, and stores the...
Read more >
Git Large File Storage (LFS) - GitLab Docs
It is possible to host LFS objects externally by setting a custom LFS URL with git config -f .lfsconfig lfs.url https://example.com/<project>.git/info/lfs .
Read more >
Git | TeamCity On-Premises Documentation - JetBrains
TeamCity supports Git LFS for agent-side checkout. To use it, install git 1.8.+ and Git LFS on the build agent machine. Git LFS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found