Squirrel / Squirrel.Windows

An installation and update framework for Windows desktop apps
MIT License
7.23k stars 1.02k forks source link

GithubUpdateManager doesn't work with accesstoken declared #1871

Closed Kitsunejasutin closed 6 months ago

Kitsunejasutin commented 6 months ago

Squirrel version(s) Which version(s) of the project are you using? 2.0.1

Description I am trying to access a private repo with a ghp token but it seems that when using a accesstoken even with public repo, it doesn't work and returns Response status code does not indicate success: 400 (Bad Request).

Steps to recreate

  1. place a new instance of GithubUpdateManager = await UpdateManager.GitHubUpdateManager("<private repo link>", accessToken: "<ghp token here>");
  2. Run the program

Expected behavior I started using a private repo and it returns Response status code does not indicate success: 400 (Bad Request). which mean the repo details is not found. Then I tested a test public repo without a release packages and it returns Sequence contains no elements means it sees the repo but because it doesn't have the necessary releases files that why it's throwing that error.

Actual behavior Ideally it should work with public repo even with the accesstoken is declared to test out if the accesstoken is working as intended and the private repo should be visible with accesstoken.

Additional information I tried with with read:packages permission first, it doesn't work then afterwards I tried giving it full repo access but still no luck. I am thinking that if I am doing something wrong with implementing the instance of GithubUpdateManager or if my permissions is inadequte within my needs, Please let me know. Thank you

caesay commented 6 months ago

This library has not had a release since 2020. If you want to give v2 of my fork a try (very similar to the original squirrel.windows, just with all the bugs fixed) it has received a lot of work around making the github integration better. If you still run into any issues over there, I'm happy to help on discord or release a fix for you.

The way you'd use it in my version of the library is new UpdateManager(new GithubSource("URL", ...));

Kitsunejasutin commented 6 months ago

This library has not had a release since 2020. If you want to give v2 of my fork a try (very similar to the original squirrel.windows, just with all the bugs fixed) it has received a lot of work around making the github integration better. If you still run into any issues over there, I'm happy to help on discord or release a fix for you.

The way you'd use it in my version of the library is new UpdateManager(new GithubSource("URL", ...));

I see, I'll give it a try. I am reading some documentations while waiting for a reply and I saw that the use of access token with query url is deprecrated and maybe that Squirrel is still using the old way of authenticating instead of Headers. I'll give your library a try. Thanks! Closing this issue