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

Can't publish private npm package #31581

Open
UchihaYuki opened this issue Jul 6, 2024 · 7 comments
Open

Can't publish private npm package #31581

UchihaYuki opened this issue Jul 6, 2024 · 7 comments
Labels
topic/packages type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@UchihaYuki
Copy link

Description

I published with npm publish --access=restricted. But it's still public. Everybody can download it, even if they are not logged in.

Gitea Version

Gitea version 1.22.0 built with GNU Make 4.4.1, go1.22.3 : bindata, timetzdata, sqlite, sqlite_unlock_notify

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

git version 2.31.1.windows.1

Operating System

Windows 10

How are you running Gitea?

docker

Database

MSSQL

@UchihaYuki
Copy link
Author

The package I published:

npm notice Publishing to https://demo.gitea.com/api/packages/uchihayuki/npm/ with tag latest and restricted access       
+ @uchihayuki/test-gitea@0.1.0

@KN4CK3R KN4CK3R added issue/not-a-bug The reported issue is the intended behavior or the problem is not inside Gitea and removed type/bug labels Jul 7, 2024
@KN4CK3R
Copy link
Member

KN4CK3R commented Jul 7, 2024

Package permissions are inherited from the owner visibility and can't be set with npm publish --access=restricted.

@KN4CK3R KN4CK3R closed this as completed Jul 7, 2024
@UchihaYuki
Copy link
Author

Can this be a feature request? It's pretty useful, people always want both public and private npm packages.

@KN4CK3R KN4CK3R reopened this Jul 12, 2024
@KN4CK3R
Copy link
Member

KN4CK3R commented Jul 12, 2024

Sure, but I don't think this will happen because it requires a new permission system.

@KN4CK3R KN4CK3R added type/proposal The new feature has not been accepted yet but needs to be discussed first. and removed issue/not-a-bug The reported issue is the intended behavior or the problem is not inside Gitea labels Jul 12, 2024
@mlhynfield
Copy link

mlhynfield commented Jul 15, 2024

I'd just like to jump in and second this as a nice feature, not just for npm packages but for packages in general. For example, I just ran into this issue myself with some container images I pushed to the container registry, where, as a relatively new user, I had expected to find controls to modify the container image visibility but instead found that I needed to change the owning organization's visibility. I think it would be really great to have a bit more control over package visibility at some point so you don't have to have a separate user/organization for public and private packages.

@SashaGoncharov19
Copy link

@mlhynfield Agree with you. I also have public org which contains some private/public repos, but i want to have some private packages also with public org.

@bvandevliet
Copy link
Contributor

This issue seems related, I'm quite sure it's even the root cause and touches a broader problem on handling permissions in the package feature as a whole: #20596

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/packages type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

6 participants