Cannot resolve from custom ivy repository (S3): invalid cookie header


(Ingmar Steiner) #1

Hi, I’m facing an issue nearly identical to that described by @jengels in this unresolved post.

I also would like to resolve a custom dependency hosted on S3, but it’s a release asset on GitHub.
From my build.gradle:

repositories {
    ivy {
        url 'https://github.com/'
        layout 'pattern', {
            artifact 'psibre/[module]/releases/download/v[revision]/[module].[ext]'
        }
    }
}

configurations {
    data
}

dependencies {
    data group: 'de.dfki.mary', name: project.name, version: project.version, ext: 'flac'
}

The expanded URL is fine and can be resolved with curl, etc. But when I try it with an ivy repository handler with a custom artifact pattern, this is what happens:

:processDataResources
Invalid cookie header: "Set-Cookie: logged_in=no; domain=.github.com; path=/; expires=Sat, 12 Apr 2036 15:41:01 -0000; secure; HttpOnly". Invalid 'expires' attribute: Sat, 12 Apr 2036 15:41:01 -0000
Invalid cookie header: "Set-Cookie: logged_in=no; domain=.github.com; path=/; expires=Sat, 12 Apr 2036 15:41:01 -0000; secure; HttpOnly". Invalid 'expires' attribute: Sat, 12 Apr 2036 15:41:01 -0000

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':data'.
> Could not resolve de.dfki.mary:dfki-spike-data:0.9.
  Required by:
      :dfki-spike-data:0.9
   > Could not resolve de.dfki.mary:dfki-spike-data:0.9.
      > Could not get resource 'https://github.com/psibre/dfki-spike-data/releases/download/v0.9/dfki-spike-data.flac'.
         > Could not HEAD 'https://github.com/psibre/dfki-spike-data/releases/download/v0.9/dfki-spike-data.flac'. Received status code 403 from server: Forbidden

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 3.424 secs

I can’t figure out whether this is just due to the unexpected format of the cookie header, and if so, how to solve the issue and get Gradle to retrieve this dependency.

Any help would be appreciated!