Skip to content

Failure on git push with LFS #323

Closed

Description

@GooRoo

Describe the bug

I work with rather big XLSX files, so I moved them to LFS. Now, the action can't push the translation:

...
PUSH TO BRANCH main
[main 7a7edba] chore: Update translations from Crowdin
 2 files changed, 2 insertions(+), 2 deletions(-)
warning: redirecting to https://github.com/sbtlocalization/some-repo-name.git/
remote: error: GH008: Your push referenced at least 1 unknown Git LFS object:        
remote:     ebda9205fb2fd046ca2ed02c492f2c84b4f07fe6cf94350a084089b85cac0cec        
remote: Try to push them with 'git lfs push --all'.        
To https://github.com/sbtlocalization/some-repo-name.git
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/sbtlocalization/some-repo-name.git'
RESTORING ORIGINAL CHECKOUT: main
...

To Reproduce

.gitattributes:

*.xlsx filter=lfs diff=lfs merge=lfs -text

crowdin.yml:

project_id: "134" 

base_path: "."
preserve_hierarchy: true

files:
  - source: "source/*.xlsx"
    translation: "/translation/%two_letters_code%_%original_file_name%"
    first_line_contains_header: true
    scheme: identifier,source_phrase,translation,labels,context

.github/workflows/download.yaml:

name: Download translation

on:
  workflow_dispatch:
  schedule:
    - cron: '21 1 * * *'

permissions:
  contents: read

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  crowdin:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - name: Checkout
        uses: actions/checkout@v6
        with:
          lfs: true

      - name: Get new translations
        uses: crowdin/github-action@959dc74ac104447731cba99a016f85d0ae719788
        with:
          upload_sources: false
          upload_translations: false

          download_translations: true
          download_language: "uk"

          create_pull_request: false
          push_translations: true
          localization_branch_name: "main"
          commit_message: "chore: Update translations from Crowdin"
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

Expected behavior

I suspect, the problem is with --no-verify in git push. It would be great if the action could push the LFS files on its own without me having to push it manually.

Activity

  1. andrii-bodnar commented on Nov 2, 2026

    @andrii-bodnar
    Member

    Thanks for the detailed report, @GooRoo! You were right: --no-verify skips the Git LFS pre-push hook, so the LFS objects never got uploaded. I've fixed it in #324: the action now runs git lfs push before pushing the branch.

    Could you try it before we release? In your workflow, point the action at the fix branch:

    - name: Get new translations
      uses: crowdin/github-action@fix/lfs-push

    Keep lfs: true on the checkout step as you have it now. Please let me know whether the push works.

  2. GooRoo commented on Nov 2, 2026

    @GooRoo
    Author

    Hi @andrii-bodnar, I've just tested your fix, and it works like a charm! Thank you.

  3. andrii-bodnar commented on Nov 2, 2026

    @andrii-bodnar
    Member

    @GooRoo thanks for the confirmation! The fix is already available in v3.5.1 and v3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions