game-ci / game-ci/unity-builder

build from private repos using git-lfs cannot be used

Open
#430 4 comments 7 reactions 0 assignees View on GitHub
bug git private repo
Dominant language
TypeScript
Stars
1.1k
Forks
313
Avg merge
1h 39m
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.