nexus-repository-dart
nexus-repository-dart copied to clipboard
Hosted Repository
Add hosted repository support
Is this feature in your roadmap? will be implemented?
Yes, the feature will be implemented, but if you want it now, feel free to develop it and submit a Pull request. Here is the specs to build a custom dart repository : https://github.com/dart-lang/pub/blob/master/doc/repository-spec-v2.md
Hello guys, is this feature on a roadmap? Do you have any supposed date? I've seen a Jira ticket on Sonatype with this feature request, but it doesn't look like something they are going to deliver soon.
Hi, I got somes troubles with authentication on this feature. It is not the priority right now. If you want to take a look, I started the work in the branch https://github.com/groupe-edf/nexus-repository-dart/tree/feature/hosted_repository And here is the documentation to build dart repository : https://github.com/dart-lang/pub/blob/master/doc/repository-spec-v2.md
@mat1e - what is the exact problem with authentication, that you are facing?
@eximius313, I'm not working on this actually, but as I remember, flutter client and dart SDK need a token authentication to upload a file on a repository and I didn't find a way to do a reconciliation between Nexus authentication and dart sdk/flutter authentication.
thanks @mat1e .
As far as I can see Dart accepts Authorization: Bearer <token>
header.
Do I understand well, that you had a problem with this token being passed from client to Nexus?
Hi @eximius313, I checked again and I blocked on the error :
IO : HTTP POST https://accounts.google.com/o/oauth2/token
| content-type: application/x-www-form-urlencoded; charset=utf-8
| user-agent: Dart pub 2.13.4
IO : HTTP error:
| SocketException: OS Error: Le délai de temporisation de sémaphore a expiré.
| , errno = 121, address = accounts.google.com, port = 58872
I tried to run command dart pub token add
to bypass the step with google authentication but in my version of dart this command doesn't exist...
I'm trying to upgrade my dart sdk but if anyone have an idea for authentication on a custom repository...
in my version of dart this command doesn't exist...
Docs says that dart pub token add
is there since Dec 8, 2021
so, it looks like since version 2.15.1
(currently it's 2.19.1
) and I see that you are using 2.13.4
which is dated Jun 28 2021
if anyone have an idea for authentication on a custom repository...
You mean Client->Nexus
or Nexus->pub.dev
?
Hi @eximius313, I checked again and I blocked on the error :
IO : HTTP POST https://accounts.google.com/o/oauth2/token | content-type: application/x-www-form-urlencoded; charset=utf-8 | user-agent: Dart pub 2.13.4 IO : HTTP error: | SocketException: OS Error: Le délai de temporisation de sémaphore a expiré. | , errno = 121, address = accounts.google.com, port = 58872
I tried to run command
dart pub token add
to bypass the step with google authentication but in my version of dart this command doesn't exist...I'm trying to upgrade my dart sdk but if anyone have an idea for authentication on a custom repository...
Why are you connecting to https://accounts.google.com/o/oauth2/token
and how is it related to Nexus?
It is when I want to publish a package on the Nexus, Dart firstly call https://accounts.google.com/o/oauth2/token
. I think I have to set the token to skip the Google account step. I will make a fresh install of dart and flutter and let you know.
It is when I want to publish a package on the Nexus, Dart firstly call
https://accounts.google.com/o/oauth2/token
. I think I have to set the token to skip the Google account step. I will make a fresh install of dart and flutter and let you know.
thanks
Update : After updating my installation, I don't get google account step so I think the token is set. Now I got :
IO : Attempt #7 for fetching versions for "new_project" from "https://localhost:8443/repository/dart-hosted/api/packages/new_project"
IO : HTTP GET https://localhost:8443/repository/dart-hosted/api/packages/new_project
| Accept: application/vnd.pub.v2+json
| user-agent: Dart pub 2.19.5
ERR : Got TLS error trying to find package new_project at https://localhost:8443/repository/dart-hosted/.
I have to fix the SSL config of my Nexus.
Any progress on hosted repository?
Hi, Sorry but I don't have time to work on this actually. But I can help everyone who want to contribute on this.