Unable to Get GitHub Feed Working with Private Repo

Hi, we’re trying to get a GitHub feed up and running, have followed the guides etc but after creating it fails to search. The result just states: “Operation is not valid due to the current state of the object”

This is using a personal token etc

Errorlog looks like its trying to hit a page which may not be correct as manually entering it fails although dropping the /repositiories part of the path confirms there is a search available?

Error performing request to https://xxxx.github.ourdomain.com/Project/Project.Infra.Terraform/search/repositories?q="a"%20org%3A&page=1&per_page=10

May 14th 2020 17:12:34Error
Unhandled error on request: http://octopus.ourdomain.com/api/Spaces-1/feeds/Feeds-1011/packages/search?term=%2Fa&take=10 9b3cd84dbcf04464917abcdb4d7273bf by : Operation is not valid due to the current state of the object. System.InvalidOperationException: Operation is not valid due to the current state of the object.
at Octopus.Core.Packages.GitHub.GitHubEndpointProxy.Search(String query, Int32 skip, Int32 take, CancellationToken cancellationToken) in C:\buildAgent\work\47b5b27d3625d6ca\source\Octopus.Core\Packages\GitHub\GitHubEndpointProxy.cs:line 277
at Octopus.Core.Packages.GitHub.GitHubPackageFeed.SearchPackages(String term, CancellationToken

Hi Nigel,

Thank you so much for reaching out. I’m sorry you’ve hit this issue, but I am looking forward to getting it resolved.

I need a few more bits of information first to help you diagnose this issue. You mention that you are using a private GitHub feed. Based on your url, it looks to be self-hosted?

  1. GitHub Packages is available with GitHub Free, GitHub Pro, GitHub Free for organizations, GitHub Team, GitHub Enterprise Cloud, and GitHub One. GitHub Packages is not available for private repositories owned by accounts using legacy per-repository plans.
    Source: https://help.github.com/en/packages/publishing-and-managing-packages/about-github-packages

Can you confirm that the accounts that own the account are not using the legacy per-repository plan?

  1. Self-hosted Enterprise Github requires a different endpoint to typical github feeds. Can you make sure the FeedURI within External feeds is pointed to https://xxxx.our-github-repo.ourdomain.com/api/v3 (as opposed to https://xxxx.our-github-repo.ourdomain.com/)

These are two common culprits when setting up self-hosted github Enterprise.

If you can confirm that these two points are satisfied - and the issue still persists, I will attempt to repro the issue in order to help you further.

If it is still an issue - can you please turn on trace logging.
https://octopus.com/docs/support/log-fileshttps://octopus.com/docs/support/log-files#Logfiles-Changingloglevels

Then run a search that fails and send me through a copy of your trace logs.

Thanks and I look forward to hearing how you get on.

Dane.

Hi, many thanks for getting back to us, point 2 (api endpoint update) solved the issue :slight_smile:

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.