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!

    Cannot connect to Git in build

    Scheduled Pinned Locked Moved Support
    6 Posts 2 Posters 8 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.
    • J Offline
      Justinvolved
      last edited by

      Hello,

      In my buildmaster application I have a connection to a Git repository, and the build worked fine before yesterday. Now when I try to build, the process says:

      The repository named "......." could not be loaded.

      I have the debug log checked and no additional information is logged.
      I have tried to reconnect the Git repository and that works fine, so it does not seem to be caused by wrong git credentials.

      The only thing that has changed is that I have changed the IIS binding to access builmaster (form the default 6262 port to a 443 binding)

      What could be the cause of this?

      Thanks,

      Justin

      1 Reply Last reply Reply Quote 0
      • J Offline
        Justinvolved
        last edited by atripp

        Update:

        I tried to inspect the script that is checking out the code from git, and there is an error there, when I switch to visual editor:

        b221261b-9051-4de8-a07f-64709fd658b1-image.png

        and in the log:

        at System.Collections.Generic.Dictionary2.FindValue(TKey key) at System.Collections.Generic.Dictionary2.ContainsKey(TKey key)
        at Inedo.BuildMaster.Web.WebApplication.Pages.OtterScriptEditor.OSVE.BuildOsveStatementDyanmic(ActionStatement statement)
        at Inedo.BuildMaster.Web.WebApplication.Pages.OtterScriptEditor.OSVE.BuildOsveStatement(Statement statement)
        at Inedo.BuildMaster.Web.WebApplication.Pages.OtterScriptEditor.OSVE.<>c.<BuildOsveScript>b__0_1(Statement s)
        at System.Linq.Enumerable.SelectArrayIterator2.MoveNext() at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at System.Linq.Enumerable.ConcatIterator1.ToList()
        at Inedo.BuildMaster.Web.WebApplication.Pages.OtterScriptEditor.OSVE.BuildOsveScript(ScriptProcessorOutput output)

        As well as:

        fcceea09-f002-43bd-89a4-6999f40ade47-Screenshot 2023-04-05 164225.png

        This is the script that is causing the visual editor to crash:

        set $NpmPath = C:\Program Files\nodejs\npm.cmd;
        
        Git::Checkout-Code
        (
            From: "..........reponame...."
        );
        
        # Install Dependencies npm
        Exec
        (
            FileName: $NpmPath,
            Arguments: install,
            WorkingDirectory: ~\,
            ErrorOutputLogLevel: Warning
        );
        
        # Build webpack
        Exec
        (
            FileName: $NpmPath,
            Arguments: run build:webpack,
            WorkingDirectory: ~\,
            ErrorOutputLogLevel: Warning
        );
        
        Create-Artifact
        (
            From: Swift/Files
        );
        
        atrippA 1 Reply Last reply Reply Quote 0
        • atrippA Offline
          atripp inedo-engineer @Justinvolved
          last edited by

          Hi @Justinvolved ,

          Looks like there's a Visual Editor bug with Exec statement; we'll investigate/fix ASAP .

          But as for the Git, you mention it's happening during an execution (i.e. build process)? Anyway, can you share more of the execution log?

          Are you able to browse the Git repository in the Web UI okay?

          If that's the case, the error is on the build agent (or BuildMaster server) in the service process. That uses a different set of local repositories than the Web UI. There may be a troubleshooting step we can take to manually clear the local repository (on the service-side), but Id like to gather more info

          Cheers,
          Alana

          1 Reply Last reply Reply Quote 0
          • J Offline
            Justinvolved
            last edited by

            Hi @atripp,

            Yes, the git error is during a build process. There is not much more of the log that share that I can see, this is what I get:
            4cd2d738-7899-4b68-86e8-9c1ce7e4a89d-Screenshot 2023-04-05 174051.png

            Yes the repository is browsable from the WebUI and shows the latest commit and all files as I would expect.

            Thanks,
            Justin

            atrippA 1 Reply Last reply Reply Quote 0
            • J Offline
              Justinvolved
              last edited by

              Hi @atripp

              The problem was gone after restarting the buildmaster service, thanks for your quick response!

              Justin

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

                Hi @Justinvolved ,

                That error message is coming from here:
                https://github.com/Inedo/inedox-git/blob/master/Git/Git.InedoExtension/Operations/CanonicalGitOperation.cs#L73

                Basically, it means that value you've specified for From is not a known Secure Resource. It's not a common error, and is likely the result of deleting/re-adding something.

                I would remove the From argument from your OtterScript altogether (just leave it as Git::Checkout-Code;). I don't think you need it. Your build should already associated with a repository, branch, and commit.

                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