nexus-repository-dart icon indicating copy to clipboard operation
nexus-repository-dart copied to clipboard

Hosted Repository

Open mat1e opened this issue 3 years ago • 16 comments

Add hosted repository support

mat1e avatar Aug 07 '21 00:08 mat1e

Is this feature in your roadmap? will be implemented?

thiagolealassis avatar Jul 01 '22 19:07 thiagolealassis

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

mat1e avatar Jul 06 '22 15:07 mat1e

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.

pwa-tapptic avatar Jan 18 '23 11:01 pwa-tapptic

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 avatar Jan 19 '23 13:01 mat1e

@mat1e - what is the exact problem with authentication, that you are facing?

eximius313 avatar Feb 26 '23 14:02 eximius313

@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.

mat1e avatar Mar 02 '23 09:03 mat1e

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?

eximius313 avatar Mar 02 '23 18:03 eximius313

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...

mat1e avatar Mar 29 '23 14:03 mat1e

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?

eximius313 avatar Mar 29 '23 15:03 eximius313

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?

eximius313 avatar Mar 29 '23 15:03 eximius313

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.

mat1e avatar Mar 30 '23 08:03 mat1e

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

eximius313 avatar Mar 30 '23 16:03 eximius313

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.

mat1e avatar May 09 '23 15:05 mat1e

Any progress on hosted repository?

zlatkoc avatar Oct 19 '23 11:10 zlatkoc

Hi, Sorry but I don't have time to work on this actually. But I can help everyone who want to contribute on this.

mat1e avatar Oct 19 '23 14:10 mat1e