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.

handle the lack of LFS locking API on the remote repository

See original GitHub issue

#2747 highlighted some Git scenarios that we don’t handle properly, and one interesting one was a push to an LFS-enabled repository that doesn’t support locking:

2017-09-21T01:19:40.407Z - error: [ui] `git -c credential.helper= push origin master:master --progress` exited with an unexpected code: 1.
Remote "origin" does not support the LFS locking API. Consider disabling it with:
  $ git config lfs.https://github.com/AndyBPA/brutes.git/info/lfs.locksverify false

This experience could be better:

  • as part of initializing LFS for the repository, we might be able to probe for it and set it
  • when the push fails, we could warn the user, set it for them and retry

Probably need to do both, but it’d be nice to get some feedback from @technoweenie or someone on the LFS team about what we should be doing here to lay the groundwork for locking support

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:60 (24 by maintainers)

github_iconTop GitHub Comments

3reactions
technoweeniecommented, Sep 26, 2017

@AndyBPA You can turn off the locks checks by running git config lfs.locksverify false. The lfs.<url>.locksverify config keys let you set this on a per-remote or per host basis.

1reaction
joshabercommented, Nov 17, 2017

It takes a bit of work to assemble all the values GitHub Desktop needs. Here’s an example with my computer:

GIT_TRACE=1 DESKTOP_ASKPASS_SCRIPT="/Users/joshaber/Documents/Development/GitHub/desktop/dist/GitHub Desktop-dev-darwin-x64/GitHub Desktop-dev.app/Contents/Resources/app/ask-pass.js" DESKTOP_ENDPOINT="https://api.github.com" DESKTOP_PATH="/Users/joshaber/Documents/Development/GitHub/desktop/dist/GitHub Desktop-dev-darwin-x64/GitHub Desktop-dev.app/Contents/Frameworks/GitHub Desktop-dev Helper.app/Contents/MacOS/GitHub Desktop-dev Helper" DESKTOP_USERNAME="joshaber" GIT_ASKPASS="/Users/joshaber/Documents/Development/GitHub/desktop/dist/GitHub Desktop-dev-darwin-x64/GitHub Desktop-dev.app/Contents/Resources/app/static/ask-pass-trampoline.sh" git -c "credential.helper=" lfs fetch —all

There are a lot of paths there that will need to be changed to be relative to where the app is on a particular machine.

I’m gonna open a PR that adds the ability to have Desktop use GIT_TRACE.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git (LFS): what is locking support? And should I enable it?
Once file patterns in .gitattributes are lockable, Git LFS will make them readonly on the local file system automatically. This prevents users ...
Read more >
Add support for Git LFS File Locking API | Bitbucket Server - Jira
Hi everyone,. Git LFS file locking is supported starting from Bitbucket Server 6.3. Details on locking and unlocking feature is here - Working...
Read more >
Error on git push: "Remote "origin" does not support the LFS ...
Checked for locked files with git lfs locks and through the UI. Nothing locked. ... Remote "origin" does not support the LFS locking...
Read more >
Remote "origin" does not support the LFS locking API ...
Consider disabling it. I was wondering if disabling the lfs lock is an expected behavior. If so, I think it should be documented...
Read more >
Large files with Git: LFS and git-annex - LWN.net
While there is work underway to handle large repositories through the ... LFS also supports file locking, which allows users to claim a...
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