Search Unity

Using Cloud Build with a Git private repo you was invited to

Discussion in 'Unity Build Automation' started by Karsten, Jun 22, 2021.

  1. Karsten

    Karsten

    Joined:
    Apr 8, 2012
    Posts:
    187
    Hello,

    Situation:
    You got invited to a private Git Repo and now you want to use Cloud Build to do regular builds to see continously day by day if your work breaks everything or the app is still building.
    Problem:
    How to setup Cloud Build to show/make use off private git repos? After "linking" your Git Hub account only public repos are shown in Cloud Build.
    Cloud build generates an ssh key for every project you create. If you add that ssh key to your github account still private repos are not shown in Cloud Build for selection. Why?
    What do I do wrong?
    I pay since years for this service and now I need a bit of its features outside of "collab" and things start quickly to be non-intuitive....
    Edit: I want to avoid doing a fork

    Thanks for any answer
     
    Last edited: Jun 22, 2021
  2. Karsten

    Karsten

    Joined:
    Apr 8, 2012
    Posts:
    187
    I solved this issue with a mad construct using a mirror in a private git server process running on a vm on my root server, its works, but does it have to be like this?Is there an easier, less impactful way?
     
  3. rajivrao

    rajivrao

    Unity Technologies

    Joined:
    Feb 19, 2019
    Posts:
    111
    Hi! Are you running your repo on a self hosted server as well? If it's just a private repo, then it might be an issue with your access level. The required access level for GitHubt "admin". Let me know if that helps or if that doesn't address the issue.
     
  4. Karsten

    Karsten

    Joined:
    Apr 8, 2012
    Posts:
    187
    I gave up on this a while ago, btw , can you please fix webhooks working with cloud build?A very simple webservice that can be called proper in a browser even with ssl (no its not a self signed cert) does not get called after trying hard with form/body data and all other options, ofc 11 times checked configured url is right and so on
     
  5. WCJonathan

    WCJonathan

    Joined:
    Oct 19, 2021
    Posts:
    1
    Hi, I'm trying to do the same thing, but using BitBucket, and the private repo I just got access to was with admin access level. But still when I try to link it I get the "Repo is not accessible" and if I do it by linking my BitBucket account it shows in the dropdown but when trying to go further I get the "An error ocurred while saving the project settings" and I'm not able to move on from there.

    Any thoughts?
     
  6. PeachyPixels

    PeachyPixels

    Joined:
    Feb 17, 2018
    Posts:
    713
    Hi @Karsten,

    FWIW

    I'm using UCB with private GitHub repos without issue. Initially it was via the .git URL but recently via oauth. With both methods, I could see private repo's and branches. That said, I'm the account owner (hence the admin) so as @rajivrao says it's likely a permissions thing.

    @rajivrao Is requiring admin permissions the only way of UCB accessing repos? Can't it be changed to allow repo collaborators (not admins) access as well?