Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build from private repos using git-lfs cannot be used #430

Open
RobTranquillo opened this issue Sep 1, 2022 · 4 comments
Open

build from private repos using git-lfs cannot be used #430

RobTranquillo opened this issue Sep 1, 2022 · 4 comments
Labels
bug Something isn't working git private repo

Comments

@RobTranquillo
Copy link

Hello and thanks or that awesome project.

Bug description

when a private repository contains git-lfs data, an error comes up in the build-action saying that git-lfs is missing the credentials:

Adding genesis user token [Package Manager] Done resolving packages in 15.22s seconds
An error occurred while resolving packages:
  Project has invalid dependencies:
    en.vrbits.sensei: Cannot checkout repository [https://github.com/XXX.git]:
      Error when executing git command. Downloading .../AWSSDK.Core.dll (1.2 MB)
      Error downloading object: .../AWSSDK.Core.dll (bd80ffb):
      Smudge error: Error downloading
      .../AWSSDK.Core.dll
      (bd80ffbe030e8439f674512c1e7f938e33509f72290fff83f4931d347480d6ac):
      batch response: Bad credentials

Since checking out the repo of that Unity package via gitPrivateToken already worked, I assume that the credentials are correct but apparently not used for git-lfs. I thought it was a Unity problem at first, so I reported it there: https://forum.unity.com/threads/git-lfs-fails-on-private-repos-in-package-manager.1327368/#post-8406315

But maybe it is also a game-ci problem?

How to reproduce

Put files into a Unity package repository using git-lfs.
Then use this package in a Unity project that is being built by game-ci.

Expected behavior

gitPrivateToken should not only provide the token to git, but also to git-lfs.

@RobTranquillo RobTranquillo added the bug Something isn't working label Sep 1, 2022
@skjalgsm-statespace
Copy link

I just encountered this problem also. Is this something someone can look at?

@RobTranquillo
Copy link
Author

If I do understand this person from Unity correct, the problem can be lay in the insufficient usage of git credential helper inside the Unity container: https://forum.unity.com/threads/git-lfs-fails-on-private-repos-in-package-manager.1327368/#post-8460623

Could it be that game-ci does not transfer the git credentials to the Unity container in the correct way when using the gitPrivateToken option?

@ChristianTellefsen
Copy link

We have exactly the same issue.

AndrewKahr added a commit to AndrewKahr/unity-builder that referenced this issue Mar 5, 2023
@AndrewKahr
Copy link
Member

Is this still an issue? I set up a test where I created a upm git repo with a png in lfs and the action will pull the package without issue. Is there anything non-standard like custom lfs servers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working git private repo
Projects
None yet
Development

No branches or pull requests

5 participants