Forestry can't clone repo

Get the following error on a forestry preview despite clearing cache. The media gallery is actually populated though.

### Server: Error

* Loading repo files

`Cloning into '.'...
Warning: Permanently added 'gitlab.com,172.65.251.78' (ECDSA) to the list of known hosts.
remote: Enumerating objects: 9992, done.        
remote: Counting objects: 100% (9992/9992), done.        
remote: Compressing objects: 100% (9763/9763), done.        
remote: Total 9992 (delta 290), reused 9887 (delta 208), pack-reused 0        
Receiving objects: 100% (9992/9992), 4.32 MiB | 8.76 MiB/s, done.
Resolving deltas: 100% (290/290), done.
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
Updating files: 100% (12250/12250), done.
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
Downloading _wetu-content/activities/243929/dsc_7803.jpg (286 KB)
fatal: could not read Username for 'https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app': No such device or address
Error downloading object: _wetu-content/activities/243929/dsc_7803.jpg (79b5bb3): Smudge error: Error downloading _wetu-content/activities/243929/dsc_7803.jpg (79b5bb3e16ea13fbff993f5b13b207df67cde3ed6f343ab35101cdcdb8b4f824): batch response: Git credentials for https://b6c2a4c8-5bbe-457b-b053-71e22eebd2c2.netlify.app/.netlify/large-media not found.

Errors logged to /opt/.git/lfs/logs/20200930T101558.280160515.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: _wetu-content/activities/243929/dsc_7803.jpg: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
`

This is happening because Large Media is being used for this site. Is the Large Media add-on installed for Netlify CLI on this system and is the Git credential helper being loaded in .bash_profile?

If you are unsure, please send us the output of the following command:

$ netlify lm:info
  ✔ Checking Git version [2.26.2]
  ✔ Checking Git LFS version [2.10.0]
  ✔ Checking Git LFS filters
  ✔ Checking Netlify's Git Credentials version [0.1.9]

The Git credential helper line looks something like this (for bash):

# Netlify Large Media
. /Users/username/.netlify/helper/path.bash.inc
# or maybe
. /home/username/.netlify/helper/path.bash.inc

If you don’t see the helper in .bash_profile or if the Netlify CLI doesn’t have the Large Media add-on installed, please let us know.

Thanks

I was actually missing some of the documented setup. Forestry’s preview server doesn’t support netlify CLI.

Needed to enable GIT_LFS_SKIP_SMUDGE https://forestry.io/docs/media/netlify-large-media/

And route image requests to netlifys version of the site not forestry’s preview server.

I will use the content you provided in a post commit build step to process new images though so it will come in handy.

As far as I can see the image transform service doesn’t provide webp so need to provide my own somehow.

C