Search Unity

Question Github LFS bandwidth quota issue or using Gitea causes cloning repo stuck

Discussion in 'Unity Build Automation' started by AytoMaximo, Mar 8, 2023.

  1. AytoMaximo

    AytoMaximo

    Joined:
    Aug 26, 2015
    Posts:
    76
    Hi everyone!

    I have a significant problem using Unity Cloud with a GitHub repository. My LFS bandwidth quota ends after ~6 builds. This is madness.

    My idea was to create a self-hosted Git repository based on Gitea and make Unity Cloud Builds from there for free. However, I can't make it work.
    For starters, I've struggled to add the proper SSH URL of my repo to the Build Automation Settings. The final version the system agreed on looks like the following pattern: ssh://run_user@domain:22/org/repo.git
    But if I start building, the process of repo cloning will never end. I've waited for around an hour and made no progress at all.

    I'd like to mention that I've checked the git clone command with the SSH URL above from another PC, and it works fine (completed in ~6min). However, I have a concern about entering the passphrase to start this operation. Does the Unity build pipeline really know about this step for private SSH repos? Maybe it's stuck because it can't proceed through this console question?

    Can anyone please give me advice on how to keep my LFS quota safe for GitHub (my PC never downloads it fully each time!) or how I can properly configure my Gitea / Unity cloud build config?
     
    Last edited: Mar 9, 2023
  2. jlemosz

    jlemosz

    Unity Technologies

    Joined:
    Oct 2, 2020
    Posts:
    9
    Hi there,

    Apologies for the delay.

    > Does the Unity build pipeline really know about this step for private SSH repos?

    Yes, you can try entering your personal access token on the SSH URL like this:

    USERNAME:PERSONALACCESSTOKEN@gitea.com/org/repo.git


    > Maybe it's stuck because it can't proceed through this console question?

    Correct; if Build Automation cannot validate your credentials, the checkout process will not start and will cause a timeout.

    > Can anyone please give me advice on how to keep my LFS quota safe for GitHub

    On the Build Consumption section of your settings, you can set storage limits for your repository.

    > how I can properly configure my Gitea / Unity cloud build config?

    Once you have set your SSH URL, Gitea will use the SSH key generated by Build Automation to connect to it, and it will check if Build Automation has a matching private key and grant it access.

    I hope you find this information helpful.

    Kind regards