Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Buildmaster - Gitea Tie In

    Scheduled Pinned Locked Moved Support
    11 Posts 4 Posters 26 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O Offline
      OtterFanboy
      last edited by OtterFanboy

      Hello,

      I read interestingly about Gitea so tried to use it with Windows and Buildmaster and had a little trouble so would be grateful for some support.

      Setup:
      Buildmaster 2022.3
      Git 2.39
      Gitea 1.18.5

      Steps taken:

      1. clean install of BM
      2. clean install of git
      3. clean install of gitea using sql lite
      4. create new direcory c:\test
      5. add file.
      6. push to gitea
      7. try to create new application via git repository
      8. it says successsful
      9. go into applications it's not present
      10. go into error logs - get a cast error

      "System.InvalidCastException: Unable to cast object of type 'Inedo.Extensions.Credentials.UsernamePasswordCredentials' to type 'Inedo.Extensibility.Git.GitServiceCredentials'.
      at Inedo.Extensibility.Git.GitRepository.GetRemoteBranchesAsync(ICredentialResolutionContext context, CancellationToken cancellationToken)+MoveNext()
      at"

      Bold text below not in anger but to distinguish between pictures 👍

      Capture 5.PNG Capture 6.PNG Capture 7.PNG Capture 8.PNG

      If i tried to do it the other way, create an Application, then create a connection I get the same error BUT if I choose not to synchronise it, it seems to fair better. Though I am still not sure its working correctly as the same error occurs in the logs?

      Capture 9.PNG Capture 10.PNG Capture 11.PNG Capture 1.PNG

      If you for instance go back into the Application and choose connections and then click on the connection for Git, the username and password shows as "Unknown", and clicking on the Edit button throws a server error.

      Go back.PNG Go back 2.PNG

      I also noticed that if the Browse Url is not populated when completing the Git connection you get a 500 error when trying to click on the Browse function under Git menu

      Browse.PNG

      stevedennisS 2 Replies Last reply Reply Quote 0
      • stevedennisS Offline
        stevedennis inedo-engineer @OtterFanboy
        last edited by

        Hi @OtterFanboy ,

        Thanks for all the details :)

        Looks like this is a regression/bug with browsing Generic Git repositories. That's a brand-new 2022 feature, and we're still working out kinks with it. We'll investigate and get it fixed ASAP!

        Stay tuned :)

        Cheers,
        Steve

        1 Reply Last reply Reply Quote 0
        • stevedennisS Offline
          stevedennis inedo-engineer @OtterFanboy
          last edited by

          @OtterFanboy forgot to mention, we did plan to build a first-class Gitea integration, so you could browse your repositories (just like GitHub etc.), but didn't get it in time. It's still on our list!

          1 Reply Last reply Reply Quote 0
          • O Offline
            OtterFanboy
            last edited by

            Thank you, it would be great to get it working as this is a key feature for our use case. Not worried about the Gitea bit for now.

            atrippA 1 Reply Last reply Reply Quote 0
            • atrippA Offline
              atripp inedo-engineer @OtterFanboy
              last edited by

              Hi @OtterFanboy ,

              FYI, Generic Git repo browsing in the UI has now been fixed as BM-3822 and will be included in the next maintenance release (March 10). If you'd liek a patch/prerelease sooner, just let me know!

              Cheers,
              Alana

              1 Reply Last reply Reply Quote 0
              • O Offline
                OtterFanboy
                last edited by

                Amazing, thank you so much.

                1 Reply Last reply Reply Quote 0
                • O Offline
                  OtterFanboy
                  last edited by

                  Many thanks for the excellent fixes put in. Can I trouble you to look at a couple of niggles please?

                  1. Clicking on Git - Files produces a 500 error when using a standalone Git instance (http://localhost:8622/applications/1/git/browse).

                  2. Clicking on the first Commit link ID produces a 500 error when using a standalone Git instance.

                  3. When adding Git on a per application level, the first time that you create a connection, with new credentials, the connection adds successfully but won't sync. It shows as "not synced". Digging into the error logs shows "System.InvalidCastException: Unable to cast object of type 'Inedo.Extensions.Credentials.UsernamePasswordCredentials' to type 'Inedo.Extensibility.Git.GitServiceCredentials'." At this point the Git browse menu appears in the header navigation bar but cannot be used (all 500 errors).

                  To get around this, go back and add it again but select the credentials created in the previous step rather than typing them this time. The repository syncs and adds successfully. If you are trying to reproduce this on a system that has successfully added this repo with credentials before, ensure you remove it from the Global Services and Credentials screen or the bug will not appear (http://localhost:8622/secure-credentials)

                  1. When trying to add a new credential for Git standalone with the same username as a previous entry, without specifying a new credential name under the advanced options, you receive a SQL FK exception rather than a user message "the credential with that username is already added". - "2627141Credentials_CreateOrUpdateCredential22`Violation of UNIQUE KEY constraint 'UQ__Credentials'. Cannot insert duplicate key in object 'dbo.Credentials'. The duplicate key value is (<NULL>, Git-test1, <NULL>, <NULL>). Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0."

                  Please pass on my thanks to all involved in this which makes a real difference - the ability to have a Pipeline linked in to standalone Git with building on commit is amazing, using the same agent as Otter is just the icing on the cake.

                  atrippA 1 Reply Last reply Reply Quote 0
                  • atrippA Offline
                    atripp inedo-engineer @OtterFanboy
                    last edited by

                    Hi @OtterFanboy ,

                    Thanks for the feedback and for finding additional bugs; I just fixed these as BM-3826 - at least I think.

                    1. Files was definitely broken (I must never have tested it last time)
                    2. That was probably related to something else (syncing issues?)... but hard to say; in theory, it should give a "red error box" when there's a problem w/ Git instead of a 500
                    3. This flow was using the wrong properties to create the resource name
                    4. Same😅

                    I also corrected the "new application flow" so that Rakko will do a "repository detection" to help select a pattern to use.

                    a280f470-6aa0-408d-8854-fde1c64ecc8c-image.png

                    Let us know if you find other UI bugs (browsing, etc.) with the "Generic Git" repository; it should work the same as Git-service integrations, but we didn't do very good regression testing on it.

                    1 Reply Last reply Reply Quote 0
                    • P Offline
                      pooms_7365
                      last edited by

                      I had similar problem when I try connecting to my local Gitea as a Generic GIt Repository but it keep cloning it

                      ccd50672-e029-45a2-b75c-53ef00af8f6d-image.png

                      and when I click close it show that connection is not sync

                      eabd07db-fd61-4e54-8399-a82516a00e3e-image.png

                      In Git tab it showing Server Error 500 and lead to error message here

                      ca2f4c29-c2a5-4cdf-83d6-a8d4cfc6a555-image.png

                      P 1 Reply Last reply Reply Quote 0
                      • P Offline
                        pooms_7365 @pooms_7365
                        last edited by

                        @pooms_7365 said in Buildmaster - Gitea Tie In:

                        I had similar problem when I try connecting to my local Gitea as a Generic GIt Repository but it keep cloning it

                        ccd50672-e029-45a2-b75c-53ef00af8f6d-image.png

                        and when I click close it show that connection is not sync

                        eabd07db-fd61-4e54-8399-a82516a00e3e-image.png

                        In Git tab it showing Server Error 500 and lead to error message here

                        ca2f4c29-c2a5-4cdf-83d6-a8d4cfc6a555-image.png

                        It work now I just give it a time to clone repo, because my Git repo is almost 15Gb.

                        atrippA 1 Reply Last reply Reply Quote 0
                        • atrippA Offline
                          atripp inedo-engineer @pooms_7365
                          last edited by

                          Hi @pooms_7365 ,

                          Thanks, I found where the error is in the code; it was in displaying the "code has not been synced" message. Easy fix (BM-3845) and it will ship in next maintenance release :)

                          And wow... 15gb!

                          Cheers,
                          Alana

                          1 Reply Last reply Reply Quote 0

                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                          With your input, this post could be even better 💗

                          Register Login
                          • 1 / 1
                          • First post
                            Last post
                          Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation