unity-builder: Can't fetch private UPM Packages from github because can't add my github credentials to Unity
Bug description We’re using private packages from github in the Unity Package Manager. Building does not work with this because Unity asks for my github credentials. On my local Windows machine, Github Crendetial Manager pops up and I can insert them. What do I have to do in an github action to add them?
- stderr: fatal: could not read Username for 'https://github.com': terminal prompts disabled
Project has invalid dependencies:
de.lefx.stepmanager: Error when executing git command. fatal: could not read Username for 'https://github.com': terminal prompts disabled
I’ve tried to add my github credentials with fusion-engineering/setup-git-credentials@v2.0.1 but does not work either.
How to reproduce
Try building a project with UPM dependency from a private github URL.
Expected behavior
Project builds 😃
Additional details
I’ve added my script and the logfiles
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 19 (11 by maintainers)
That’s a fair point and thank you for elaborating on your use case, this is very helpful.
I suppose we could add gitUser and gitPassword as parameters and pass them into the image.
I believe unity has specific ENV variables it wants to use for UPM.
Open for contributions.
I see. If that is GitHub official answer (for now) then so is ours. I stand corrected. Conceptually though not everyone has their own tokens for CI, just the person setting it up configures a token. Not sure if this is obvious for everyone or not.
As for the cases let’s also consider:
That is to say that I think we’d like to support a similar solution as the one you proposed, as long as it works for everyone or is forward compatible with all cases in some way.
Finally, let’s see how much of the problem would get solved by https://github.com/game-ci/unity-builder/pull/278/files or how much of that PR can be reused.
Thank you for your extended explanation and consideration. 😃
Hmm, my Problem with this is on the usability side, because I have to change the manifest.json to SSH and teach all my non-dev collaborateurs how to install SSH Keys on Windows 😦. I’ll another way by, maybe rewriting the manifest.json in the Action. Thanks!