404 Error When Accessing a File in a Private Repo with a PAT on GitHub #76392
Unanswered
AndonMitev
asked this question in
Programming Help
Replies: 1 comment 1 reply
-
PS: tried with: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Body
I'm encountering an issue while trying to access a file in a private GitHub repository from my application. I have generated a Personal Access Token (PAT) and am using it in the request header as
Authorization: Bearer {PAT_TOKEN}
, but I keep receiving a 404 error.The file I'm trying to access is part of a private repository's release assets. I can confirm that the link works correctly when accessed directly through my GitHub account:
https://github.com/AndonMitev/tauri-updater-private-repo/releases/latest/download/latest.json
. This URL allows me to download the file without any issues when I'm accessing from the browser. Also have similar url but in public repo for testing purposes. Also tried to switch visibility of the repo from private to public and indeed is working as expectedHowever, when I attempt to fetch this file using the PAT in my application, it fails. Here's a brief overview of what I've done:
Generated a PAT with full repository access to eliminate any permission-related issues.
Used the PAT in the request header in the format: Authorization: Bearer {PAT_TOKEN}.
Despite these steps, I'm still facing a 404 error. Any insights or suggestions on what might be going wrong or what I should check would be greatly appreciated.
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions