Comments (4)
Some debugging revealed some interesting things - the actual request made is e.g.:
https://tkrah:[email protected]/api/v1/versions/colorize.json
This won't work - the repository does not run under that URL - it's missing the whole part about the gem-repos url part:
/artifactory/api/gems/gems-repos/
Additionally the OkHttpBuilder has a auth part called
applyAuth(requestBuilder, chainedConfig);
which has this:
private static void applyAuth(final Request.Builder requestBuilder, final ChainedHttpConfig chainedConfig) {
final HttpConfig.Auth auth = chainedConfig.getChainedRequest().actualAuth();
if (auth != null) {
switch (auth.getAuthType()) {
case BASIC:
requestBuilder.addHeader("Authorization", Credentials.basic(auth.getUser(), auth.getPassword()));
break;
case DIGEST:
// supported in constructor with an interceptor
}
}
}
but authentication was not configured for that request (although it's included in the configured URL) - not sure if it will be respected or not, can't tell for sure because the whole URL does not match the configured one.
Maybe someone has an idea what's wrong.
from jruby-gradle-plugin.
I have this problem as well. I'm using this plugin to run a Ruby script (with gems) as part of my gradle build. Everything works fine if I use the default ruby.gems()
repository, but I can't find a way to tell it to use my artifactory instance instead.
Using bundler, I changed my Gemfile from source "https://rubygems.org"
to source "https://myartifactory.jfrog.io/artifactory/api/gems/gems/"
and stored my credentials in an environment variable
export BUNDLE_MYARTIFACTORY__JFROG__IO="user:pwd"
and that works great for bundler. I tried doing the obvious thing similar to @tkrah and changing the repo to ruby.gems("https://user:[email protected]/artifactory/api/gems/gems")
but that fails to resolve with a similar error
404 client error for request to /rubygems/twine/1.1.1/ivy.xml
> Task :myproj:jrubyPrepare FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':myproj:jrubyPrepare'.
> Could not resolve all dependencies for configuration ':myproj:gems'.
> Could not find rubygems:twine:1.1.1.
Searched in the following locations:
- http://localhost:61344/rubygems/twine/1.1.1/ivy.xml
- https://myartifactory.jfrog.io/artifactory/libs-release/rubygems/twine/1.1.1/twine-1.1.1.pom
Required by:
project :myproj
from jruby-gradle-plugin.
I think the fact that it searched http://localhost:61344/rubygems/twine/1.1.1/ivy.xml
is promising, because that's the internal ivy proxy that the jruby plugin sets up. The annoying part is I can't find any way to see how that proxy is trying to resolve my custom URI. So it's hard to debug.
from jruby-gradle-plugin.
@silverhammermba look at #429 (comment) - I've debugged through the code - the whole url resolution is wrong if you specify a custom repository and auth is unconfigured.
from jruby-gradle-plugin.
Related Issues (20)
- any version for java 8? HOT 4
- Gradle 7.1 deprecation warnings
- Requesting non-alpha 2.1.0 release HOT 7
- JRubyPrepare projectOperations missing input or output annotation HOT 1
- JRubyPrepare task fails on Windows Github Actions
- Gradle 7 deprecation warnings HOT 1
- Cannot install Nokogiri 1.14.0 HOT 1
- Test multiple gradle versions using https://github.com/gradle/gradle-build-action
- Remove traces of bintray publishing
- Move packages to dedicated "jruby-gradle" account in plugins.gradle.org HOT 1
- Java 8 support
- Publishing GitHub Pages
- `JRubyExec` doesn't stop on debugger
- 'jruby-gradle-core-plugin` Second Level Dependency Moved/Removed From Maven Central and Gradle Plugin Portal HOT 3
- example run-simple-ruby-script gradlew run error
- `setMain` in `JRubyExec` is removed in Gradle 8 and hence the plugin doesn't work
- `Cannot fingerprint input property 'gemConfiguration'`
- Gradle 8 compatibility?
- JRuby Gradle plugin does not resolve anymore
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jruby-gradle-plugin.