unity-builder icon indicating copy to clipboard operation
unity-builder copied to clipboard

Add support for setting up Git Credential Manager [PR possibility]

Open Auroriax opened this issue 1 year ago • 6 comments

Context

In some cases I want to use the git credential manager, rather than the git URI rewrites that are currently done when using gitPrivateToken. For example, to work around any issues and edge cases, e.g. as described in #430.

Suggested solution

A new build parameter called gitPrivateUser (name suggestions welcome). When gitPrivateUser and gitPrivateToken are both provided, GameCI will set up the Git Credential Manager instead of git URI rewrites.

Considered alternatives

Initially I tried to resolve the underlying bug for this problem (an issue similar to #430), but sadly I don't have the experience and time to do as such. However, setting up the git credential manager was a quick addition that resolved the permission issues we were having, and are planning to use for our projects.

Originally I wanted to switch to pull in the packages via SSH, but my senior pushed back on this given the extra setup required for all developers on the team, which is why we'd prefer to use HTTPS.

Additional details

Link to discussion on the Discord server: "Bad Credentials when resolving packages with git-lfs" Existing implementation in our fork of Unity Builder: https://github.com/Psylaris/unity-builder/commit/5f814eb1823b297d9361c645e02fcfe04c23537b (I can make a PR if requested.)

Auroriax avatar Jul 04 '23 09:07 Auroriax