Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hosted Repository #2

Open
mat1e opened this issue Aug 7, 2021 · 16 comments
Open

Hosted Repository #2

mat1e opened this issue Aug 7, 2021 · 16 comments
Assignees
Labels
enhancement New feature or request

Comments

@mat1e
Copy link
Member

mat1e commented Aug 7, 2021

Add hosted repository support

@mat1e mat1e added the enhancement New feature or request label Aug 7, 2021
@mat1e mat1e self-assigned this Aug 7, 2021
@mat1e
Copy link
Member Author

mat1e commented Mar 16, 2022

@thiagolealassis
Copy link

Is this feature in your roadmap? will be implemented?

@mat1e
Copy link
Member Author

mat1e commented Jul 6, 2022

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

@pwa-tapptic
Copy link

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.

@mat1e
Copy link
Member Author

mat1e commented Jan 19, 2023

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

@eximius313
Copy link

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

@mat1e
Copy link
Member Author

mat1e commented Mar 2, 2023

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

@eximius313
Copy link

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?

@mat1e
Copy link
Member Author

mat1e commented Mar 29, 2023

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

@eximius313
Copy link

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
Copy link

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?

@mat1e
Copy link
Member Author

mat1e commented Mar 30, 2023

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.

@eximius313
Copy link

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

@mat1e
Copy link
Member Author

mat1e commented May 9, 2023

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.

@zlatkoc
Copy link

zlatkoc commented Oct 19, 2023

Any progress on hosted repository?

@mat1e
Copy link
Member Author

mat1e commented Oct 19, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants