Code Monkey home page Code Monkey logo

Comments (13)

IRus avatar IRus commented on June 9, 2024 1

Hmm, I need more time to investigate, will do this evening

from repo.kotlin.link.

IRus avatar IRus commented on June 9, 2024

Looks like github packages required auth (https://maven.pkg.github.com/mpetuska/npm-publish/lt/petuska/npm-publish/1.1.1/npm-publish-1.1.1.pom)

I generated token (https://github.com/settings/tokens/new):

image

And use it in maven section:

image

But somehow it doesn't work (but I can use same pair in basic auth in browser https://maven.pkg.github.com/mpetuska/npm-publish/lt/petuska/npm-publish/1.1.1/npm-publish-1.1.1.pom).

from repo.kotlin.link.

IRus avatar IRus commented on June 9, 2024

With repo itself, no problems: https://maven.pkg.github.com/mpetuska/npm-publish/

from repo.kotlin.link.

IRus avatar IRus commented on June 9, 2024

But even without proxy repo I can't pull from https://maven.pkg.github.com/mpetuska/khakra
Is it "public"?

from repo.kotlin.link.

mpetuska avatar mpetuska commented on June 9, 2024

it is, and I'm able to pull from it directly

from repo.kotlin.link.

mpetuska avatar mpetuska commented on June 9, 2024
repositories {
  maven("https://maven.pkg.github.com/mpetuska/khakra") {
    credentials {
      username = project.properties["gpr.username"]?.toString() ?: System.getenv("GH_PKG_USER")
      password = project.properties["gpr.password"]?.toString() ?: System.getenv("GH_PKG_PASSWORD")
    }
  }
}

from repo.kotlin.link.

mpetuska avatar mpetuska commented on June 9, 2024

Any progress on this? Might be good to setup some github service user credentials to expose gh packages anonymously via this project?

from repo.kotlin.link.

IRus avatar IRus commented on June 9, 2024

What happens normally:

Gradle -> HEAD maven.pkg.github.com
  Github -> 401, www-authenticate: Basic realm="GitHub Package Registry"
Gradle -> HEAD maven.pkg.github.com, Authorization: Basic <credentials>

What happens with http redirect:

Gradle -> HEAD repo.kotlin.link
  repo.kotlin.link -> 302, maven.pkg.github.com
Gradle -> HEAD, maven.pkg.github.com
  Github -> 401, www-authenticate: Basic realm="GitHub Package Registry"
    Gradle -> Fail

I don't know why client doesn't try to do auth for redirected location, and just fails instead.
It's maybe bug in client used in gradle, or behavior according spec.

from repo.kotlin.link.

mpetuska avatar mpetuska commented on June 9, 2024

Ah, but you need to redirect to https://maven.pkg.github.com/mpetuska/khakra (note the subpath). I think https://repo.kotlin.link/mpetuska/khakra might just work. Ideally you'd support path segments in sub-repos for redirection, not just domain

from repo.kotlin.link.

IRus avatar IRus commented on June 9, 2024

Yes, location taken into account, I exclude it from explanation to reduce noise:

image

from repo.kotlin.link.

IRus avatar IRus commented on June 9, 2024

So conclusion is:

  1. Repositories required authentication doesn't work
  2. Even if they'll work, it's security risk, since basic auth (essentially open user + token) can be sent to 3rd party repo by gradle

from repo.kotlin.link.

mpetuska avatar mpetuska commented on June 9, 2024

I think github is the main draw to this project. Even if it'd just proxy the auth from the consumer

from repo.kotlin.link.

IRus avatar IRus commented on June 9, 2024

Yes, github probably is huge source of packages, but currently it not possible to support it. I thinking about organizing enterprise level repository on top of ipfs, but right now it's just idea

from repo.kotlin.link.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.