Authentication for private repositories does not work
See original GitHub issueI’ve created a private sandbox repository to play with, but I am unable to create a token to access it:
The relevant part my config.cdn looks like this:
repositories [
.udosandbox
releases
snapshots
]
then I created a token to access the private repository:
keygen /udosandbox whoever w
20:44:12.765 INFO |
20:44:12.905 INFO | Stored tokens: 7
20:44:12.907 INFO | Generated new access token for whoever (/udosandbox) with 'w' permissions
20:44:12.909 INFO | okZMFC0Jqujx8yg1YjUx84pl4ZD2hOJMXj7cAeDdlMtrka+D8pYxkhLliwO+Er3d
20:44:12.909 INFO |
Now when I try to access the reposilite server with http://reposilite.example.com:8084/udosandbox, the browser asks for credentials using the browser native user credentials popup and when I enter them, I am redirected to the “Index of /udosandbox/” page, displaying an empty repository plus a a red “Unauthorized access” overlay on top:
The log then shows this:
20:48:40.808 DEBUG | LOOKUP /udosandbox from 10.9.0.6
20:48:40.808 DEBUG | Header ---
20:48:40.808 DEBUG | Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
20:48:40.808 DEBUG | Upgrade-Insecure-Requests: 1
20:48:40.808 DEBUG | User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0
20:48:40.809 DEBUG | Connection: keep-alive
20:48:40.809 DEBUG | Sec-GPC: 1
20:48:40.809 DEBUG | Host: reposilite.example.com:8084
20:48:40.809 DEBUG | Accept-Language: de-DE,en-US;q=0.7,en;q=0.3
20:48:40.809 DEBUG | Accept-Encoding: gzip, deflate
20:48:40.809 DEBUG | DNT: 1
20:48:40.809 DEBUG | Authorization credentials are not specified
20:48:51.790 DEBUG | LOOKUP /udosandbox from 10.9.0.6
20:48:51.790 DEBUG | Header ---
20:48:51.791 DEBUG | Authorization: Basic d2hvZXZlcjpva1pNRkMwSnF1ang4eWcxWWpVeDg0cGw0WkQyaE9KTVhqN2NBZURkbE10cmthK0Q4cFl4a2hMbGl3TytFcjNk
20:48:51.791 DEBUG | Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
20:48:51.791 DEBUG | Upgrade-Insecure-Requests: 1
20:48:51.791 DEBUG | User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0
20:48:51.792 DEBUG | Connection: keep-alive
20:48:51.792 DEBUG | Sec-GPC: 1
20:48:51.792 DEBUG | Host: reposilite.example.com:8084
20:48:51.793 DEBUG | Accept-Language: de-DE,en-US;q=0.7,en;q=0.3
20:48:51.793 DEBUG | Accept-Encoding: gzip, deflate
20:48:51.798 DEBUG | DNT: 1
20:48:52.051 INFO | AUTH whoever accessed /udosandbox
20:48:52.449 INFO | API /api/udosandbox/ from 10.9.0.6
20:48:52.450 DEBUG | Header ---
20:48:52.450 DEBUG | Authorization: Basic Og==
20:48:52.451 DEBUG | Accept: application/json, text/plain, */*
20:48:52.451 DEBUG | User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0
20:48:52.451 DEBUG | Connection: keep-alive
20:48:52.452 DEBUG | Referer: http://reposilite.example.com:8084/udosandbox
20:48:52.452 DEBUG | Sec-GPC: 1
20:48:52.452 DEBUG | Host: reposilite.example.com:8084
20:48:52.453 DEBUG | Accept-Language: de-DE,en-US;q=0.7,en;q=0.3
20:48:52.453 DEBUG | Accept-Encoding: gzip, deflate
20:48:52.453 DEBUG | DNT: 1
20:48:52.454 DEBUG | Invalid authorization credentials
Any ideas what might be the problem?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Private Repository Authentication :: Antora Docs
Antora can authenticate with private repositories using HTTP Basic authentication. HTTP Basic authentication requires sending credentials to the server ...
Read more >Problems on Import from private repository using username ...
When importing a private repository configured to be mirrored, you need to give a username and password for authentication.
Read more >Authentication for privately hosted packages and repositories
Your private package server or version control system is probably secured with one or more authentication options. In order to allow your project...
Read more >Authenticate private github repository using https
I suspect you've got a local git setup that attempts to automatically authenticate with a saved username and password instead of prompting you ......
Read more >Private Repositories - Declarative GitOps CD for Kubernetes
Private repositories that require a username and password typically have a URL that start with https:// rather than git@ or ssh:// . Credentials...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
alright, so closing this issue in favor of #240
It’s hard to say to be honest. I’m still working on it and there is still much work to do. Everything about it is here:
I’m going on a 3 weeks break in ~10.07.2021, so we will see if I’d be able to deliver at least some kind of an alpha release until this date.