Search Unity

Question Github private repositories - Entering username and password (MAC)

Discussion in 'Package Manager' started by danUnity, Dec 21, 2020.

  1. danUnity

    danUnity

    Joined:
    Apr 28, 2015
    Posts:
    229
    Hi,

    I'm trying to load a private Github repository of mine.

    I'm getting the following error:

    Cannot perform upm operation: Unable to add package [https://mycompany.github.com/gitproject/com.mycompany.mypackage.git]: Error when executing git command. fatal: could not read Username for 'https://mycompany.github.com': terminal prompts disabled [NotFound] UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorApplication.cs:310)

    At the end of that documentation page they explain how to resolve that issue:
    https://docs.unity3d.com/Manual/upm-ui-giturl.html

    I would like to use the OSXKeyChain method but I'm new to Mac and I'm not sure how to actually do it...

    I want to use the https github URL method and I guess I need to put my login info in the KeyChain in my Mac but not sure how...

    (On PC there was a pop up in Unity that asked me for the username and password of Git but nothing is happening on Mac except that I'm getting that error)

    Would like some more detailed explanation on that!

    Thank you!
     
    JesseSTG and Kokowolo like this.
  2. UnityMaru

    UnityMaru

    Community Engagement Manager PSM

    Joined:
    Mar 16, 2016
    Posts:
    1,227
    Hey there.

    I've run this past the team to look at. There will be a slight delay due to the holidays so apologies if we get back to you a bit late.
     
  3. danUnity

    danUnity

    Joined:
    Apr 28, 2015
    Posts:
    229
    Hi @UnityMaru !

    Ok great! Hopefully, they will be able to shed some light on my issue! What strange to me is that I got a message box on windows and not on MAC.

    Looking forward to some more explanation! :)
     
  4. danUnity

    danUnity

    Joined:
    Apr 28, 2015
    Posts:
    229
  5. danUnity

    danUnity

    Joined:
    Apr 28, 2015
    Posts:
    229
    Bump!
     
  6. Davidtr_Unity

    Davidtr_Unity

    Unity Technologies

    Joined:
    Mar 5, 2020
    Posts:
    34
  7. danUnity

    danUnity

    Joined:
    Apr 28, 2015
    Posts:
    229
    Thank you!

    Exactly what I was looking for!
     
  8. danUnity

    danUnity

    Joined:
    Apr 28, 2015
    Posts:
    229
    In case others stumble upon this post. The easiest option is to download the app Git Credential Manager by executing the .pkg file of the last release version of the app. As soon as Unity requests the user/password, the app will launch and allow you to connect via a couple of methods like using the browser.
     
    halley likes this.
  9. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,445
    Yep, on Windows there is a built-in Credential Manager, but git credentials are typically brokered with a public key scheme like shell servers or APK signing keys.
     
    danUnity likes this.
  10. Kokowolo

    Kokowolo

    Joined:
    Mar 26, 2020
    Posts:
    60
    I didn't try installing Git Credential Manager, but installing GitHub CLI through this link with Homebrew (I'm about to follow the same steps on Windows through Conda, fingers crossed) was super easy. In the event that someone reads this and needs help setting up a GitHub auth token, here's another link on how to do that.