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

gemPush supports -k option #152

Open
okkez opened this issue Mar 29, 2024 · 3 comments
Open

gemPush supports -k option #152

okkez opened this issue Mar 29, 2024 · 3 comments

Comments

@okkez
Copy link

okkez commented Mar 29, 2024

The gem command has -k option to specify keyname in $HOME/.gem/credentials.
In the current version, gemPush will use the default API key always.
In general, the default API key needs OTP by default.

We can generate an API key that does not need OTP if needed.

See https://guides.rubygems.org/api-key-scopes/

That's why, I want to generate the API key without OTP and set it to $HOME/.gem/credentials.

gem help push
Usage: gem push GEM [options]

  Options:
    -k, --key KEYNAME                Use the given API key
                                     from /home/kenji/.gem/credentials
        --otp CODE                   Digit code for multifactor authentication
                                     You can also use the environment variable GEM_HOST_OTP_CODE
        --host HOST                  Push to another gemcutter-compatible host
                                       (e.g. https://rubygems.org)
(snip)
@hiroyuki-sato
Copy link
Member

Hello, @okkez.
Have you ever tried gemPush using JRuby?
In my test, gemPush doesn't work properly on JRuby platform.
jruby/jruby#7938

Im using MRI for gemPush.

@okkez
Copy link
Author

okkez commented Mar 29, 2024

I've just published some gems using gemPush task like following:

I have the default API key in $HOME/.gem/credentials.
I set GEM_HOST_OTP_CODE from my authenticator app.

env GEM_HOST_OTP_CODE=xxxxxx ./gradlew gemPush
Path for java installation '/usr/lib/jvm/openjdk-16' (Common Linux Locations) does not contain a java executable
Path for java installation '/usr/lib/jvm/openjdk-11' (Common Linux Locations) does not contain a java executable
Path for java installation '/usr/lib/jvm/openjdk-17' (Common Linux Locations) does not contain a java executable
Path for java installation '/usr/lib/jvm/openjdk-15' (Common Linux Locations) does not contain a java executable

> Task :gemPush
Executing: `java org.jruby.Main -rjars/setup -S gem push /home/kenji/wc/src/github.com/okkez/embulk-input-trino/build/gems/embulk-input-trino-0.0.1-java.gem --verbose`
    with working directory at: /home/kenji/wc/src/github.com/okkez/embulk-input-trino/build/gems
    with classpath: [ /home/kenji/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/9.4.3.0/7324205fb4ad1b40d6aee488db6e72918f397ad4/jruby-complete-9.4.3.0.jar ]
2024-03-28T10:37:16.063+09:00 [main] WARN FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem
Pass '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED' to enable.
Pushing gem to https://rubygems.org...
POST https://rubygems.org/api/v1/gems
200 OK
Successfully registered gem: embulk-input-trino (0.0.1-java)
Executing `gem push` finished successfully.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.6/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 9s
7 actionable tasks: 1 executed, 6 up-to-date

@hiroyuki-sato
Copy link
Member

hiroyuki-sato commented Apr 10, 2024

Hello, @okkez Sorry to be late, thank you for your test.

As we announced before, unfortunately,

The JRuby integration with Embulk will not be maintained actively. We will not remove it sooner, but Ruby-based plugins will not be supported actively as a matter of high priority.

https://dev.embulk.org/topics/get-ready-for-v0.11-and-v1.0-updated.html
(But I want to keep the JRuby feature personally. We're looking for a JRuby feature maintainer.)

We also released Install a Maven artifact from the Embulk command-line in Embulk v0.10.3

We are focusing on the maven feature right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants