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!

[Otter 3.0] Unable to configure Default Git Raft



  • I'm trying to configure a new default raft in Otter 3.0. When I create a git raft using a name other than default everything works as expected. However, if I create a raft using the same repository & credentials that previously worked and name it "default" any attempts to utilize the raft result in a HTTP 500 error. Below is the stack track of the exception from the server.

    URL: http://otter/rafts/items?raftId=3
    Referrer: http://otter/administration/rafts
    User: (unknown)
    User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36 Edg/88.0.705.50
    Stack trace: at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
    at LibGit2Sharp.Core.Proxy.git_remote_fetch(RemoteHandle remote, IEnumerable`1 refSpecs, GitFetchOptions fetchOptions, String logMessage)
    at LibGit2Sharp.Commands.Fetch(Repository repository, String remote, IEnumerable`1 refspecs, FetchOptions options, String logMessage)
    at Inedo.Extensions.Git.RaftRepositories.GitRaftRepository2.Fetch(Repository repository)
    at Inedo.Extensions.Git.RaftRepositories.GitRaftRepository2.Inedo.Extensibility.RaftRepositories.ISyncRaft.SynchronizeAsync(ILogSink logSink)
    at Inedo.Otter.WebApplication.Pages.Rafts.ListRaftItemsPage.<CreateChildControlsAsync>d__13.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Inedo.Otter.WebApplication.Pages.OtterSimplePageBase.<InitializeAsync>d__7.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Inedo.Web.PageFree.SimplePageBase.<ExecutePageLifeCycleAsync>d__51.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Inedo.Web.PageFree.SimplePageBase.<ProcessRequestAsync>d__50.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar)
    at Inedo.Web.Handlers.AsyncHandlerWrapper.EndProcessRequest(IAsyncResult result)
    at System.Web.HttpApplication.CallHandlerExecutionStep.InvokeEndHandler(IAsyncResult ar)
    at System.Web.HttpApplication.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar)
    

  • inedo-engineer

    Hi @Joshua_1353,

    I'm having a bit of trouble recreating this issue. I have a few questions for you to help get me started.

    • What provider are you hosting your Git repository through?
    • Are you using Secure Credentials to connect to this? Or are you using the username and password fields on the Git raft?
    • Do you see any other errors in the diagnostics center?
    • Did your Git repository have anything in it already or was it a blank repository?

    This should help me try to recreate the error.

    Thanks,
    Rich



  • @rhessinger said in [Otter 3.0] Unable to configure Default Git Raft:

    What provider are you hosting your Git repository through?

    • I'm using the Git extension version 1.10.1

    Are you using Secure Credentials to connect to this? Or are you using the username and password fields on the Git raft?

    • Yes, I'm using secure credentials currently, though I've also tried using the username and password fields on the raft as well with no effect.

    Do you see any other errors in the diagnostics center?

    • Not that I recall, when I looked at the diagnostics center it only showed the exception, I pasted in my initial post for the period I was working with the git raft.

    Did your Git repository have anything in it already or was it a blank repository?

    • Yes, it was initialized with a mirror of the content from the default raft using the steps provided in the documentation you have avalible on docs.inedo.com.

  • inedo-engineer

    Hi @Joshua_1353,

    That all sounds correct. Can you please send a screenshot of your root folders in your Git branch? I'm thinking that maybe there is a folder conflict.

    Thanks,
    Rich



  • @rhessinger Here's the root folders from the repo:
    0be5c0fc-5800-4a86-9e25-f03fe36eec2f-image.png


  • inedo-engineer

    Hi Joshua,

    It looks like the exception is missing the actual error message. I have added some code to improve that error. Could you install Get 1.10.2-CI.1 and see if we can get a better error message relating to what issue you are seeing?

    You can manually install this extension by:

    1. Download the new version
    2. Rename it to Git.upack
    3. Copy it to your Otter Extensions folder (You can find the location by checking the Extensions.ExtensionsPath in Administration -> Advanced Settings)
    4. Restart the Otter web application (restart the application pool in IIS or restart the integrated web server service) and the Otter Service

    Thanks,
    Rich



  • @rhessinger I will try that and reply with the updated error message.



  • @rhessinger

    Message: An error occurred in the web application: Failed to fetch repository: too many redirects or authentication replays

    Details:

    URL: http://otter/rafts/items?raftId=3
    Referrer: http://otter/administration/rafts
    User: (unknown)
    User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36 Edg/88.0.705.56
    Stack trace: at Inedo.Extensions.Git.RaftRepositories.GitRaftRepository2.Fetch(Repository repository)
    at Inedo.Extensions.Git.RaftRepositories.GitRaftRepository2.Inedo.Extensibility.RaftRepositories.ISyncRaft.SynchronizeAsync(ILogSink logSink)
    at Inedo.Otter.WebApplication.Pages.Rafts.ListRaftItemsPage.<CreateChildControlsAsync>d__13.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Inedo.Otter.WebApplication.Pages.OtterSimplePageBase.<InitializeAsync>d__7.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Inedo.Web.PageFree.SimplePageBase.<ExecutePageLifeCycleAsync>d__51.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Inedo.Web.PageFree.SimplePageBase.<ProcessRequestAsync>d__50.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar)
    at Inedo.Web.Handlers.AsyncHandlerWrapper.EndProcessRequest(IAsyncResult result)
    at System.Web.HttpApplication.CallHandlerExecutionStep.InvokeEndHandler(IAsyncResult ar)
    at System.Web.HttpApplication.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar)
    

  • inedo-engineer

    Ah, glad we can see the message now.

    Okay - so that error message is coming from within libgit2, and it basically just means there's an authentication error. The most common reason is that the username/password credentials for GitHub are invalid, but the git server (github in this case) won't give the reason -- it could also can also mean your account is locked, you're using a "username" instead of a "token", don't have access to the branch, etc.

    If it works on your local computer, but not BuildMaster, then it means there's "something" in either your local repository or global git configuration that's allowing it. Usually, this is stored git credentials, or even a plug-in that's allowing it.

    That being said, it could also be related to the credentials changes in Otter v3; the problem is we can't reproduce it here. Could we trouble you to do this.

    1. Create a repository on public GitHub.com (i.e. not a private repo, or on a private github instance)
    2. Try that, verify it works
    3. If it doesn't, give me access whatatripp, so then we can test your repository

    With this, we can be looking/working on the same repository, and at least figure out where the problem lies.



  • @atripp I tried using a public repository as you suggested (with and without credentials) and it resulted in the same error message as before.

    Here's the repository I created https://github.com/UTM-Online/DebugRaft and I've added you to it as a contributor. I've also granted you read access to the repository I'm trying to configure with Otter located here https://github.com/UTM-Online/DefaultRaft/.


  • inedo-engineer

    @Joshua_1353 Thanks, I was able to access it without a problem, and added a test script.

    But I made a mistake at first, and I kept the default branch name of "master" in the Raft dialog. On your repository, the master branch is named "main".

    What is the configuration inside of Otter? If it says "master" then there will be a sort of error.


  • inedo-engineer

    @Joshua_1353 I also got this message from GitHub;

    Basic authentication using a password to Git is deprecated and will soon no longer work. Visit https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information around suggested workarounds and removal dates.

    I wonder if it's disabled on your account, already 🤔



  • @atripp That shouldn't matter, I'm not using a password, I'm using a PAT token also Otter is configured to use the main brain on the repository.



  • @atripp Any updates on this issue?


  • inedo-engineer

    @Joshua_1353 sorry, I thought it was closed/resolved already

    Did you enter main in the Raft Configuration's branch setting? The default branch name in a Git repository is is master, but GitHub now uses main as the default branch, which means you have to explicitly specify it in many tools.

    If you don't specify main, then you'll get this error.



  • @atripp

    @Joshua_1353 said in [Otter 3.0] Unable to configure Default Git Raft:

    @atripp That shouldn't matter, I'm not using a password, I'm using a PAT token also Otter is configured to use the main brain on the repository.

    As I said in post on the eighth (quoted above, though brain should branch), I've already configured otter to use the branch named main for its source branch on git hub. I don't think branch names is the issue. Any thoughts on what else the issue might be, I would love to get this feature working.


  • inedo-engineer

    @Joshua_1353 sorry about that, I missed it.

    As you can see from the flurry of commits I just made to your repository, I'm simply not experiencing the problem. I tried this with both a Secure Credential, and without.

    Here's what I discovered during my testing

    • the Git Raft Editor isn't very clear about "keeping the same password" if it's unchanged, but that's what happens
    • GitHub doesn't seem to look at the username? I entered invalid usernames and it worked fine
    • the PAT permission required seems to be "public_repo

    Unless you have something that's "doing something" between Otter and GitHub, I think that:

    • you made a typo or something in your PAT; you can't have any spaces, it must be exactly a PAT, so make sure to edit and save it
    • your PAT doesn't have right permission

    From here, about the onloy thing you could do is attach a proxy server like Fiddler between Otter and GitHub, and see specifically what traffic is flowing through. But like I said I think it's one of the above to


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation