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

java.io.FileNotFoundException: /home/runner/.m2/settings-security.xml (No such file or directory) #357

Closed
2 of 5 tasks
mr3 opened this issue Jul 15, 2022 · 5 comments
Closed
2 of 5 tasks
Labels
bug Something isn't working needs triage

Comments

@mr3
Copy link

mr3 commented Jul 15, 2022

Description:
Error: Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.13:deploy (injected-nexus-deploy) on project arex-common: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.13:deploy failed: Cannot decipher credentials to be used with Nexus! org.sonatype.plexus.components.sec.dispatcher.shaded.SecDispatcherException: java.io.FileNotFoundException: /home/runner/.m2/settings-security.xml (No such file or directory) -> [Help 1]

I have checked similar issues: #91, but did not fix this problem.

Task version:
actions/setup-java@v3

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:
The problem github action workflow runs: https://github.com/arextest/arex-common/actions/runs/2675590433

Expected behavior:
The job would complete successfully.

Actual behavior:
An error is printed and the step and job are failed.

@mr3 mr3 added bug Something isn't working needs triage labels Jul 15, 2022
@mr3 mr3 closed this as completed Jul 15, 2022
@mr3 mr3 changed the title The process '/usr/bin/gpg' failed with exit code 2 java.io.FileNotFoundException: /home/runner/.m2/settings-security.xml (No such file or directory) Jul 15, 2022
@mr3 mr3 reopened this Jul 15, 2022
@mr3
Copy link
Author

mr3 commented Jul 15, 2022

Please ignore ths issue. I have fixed it, misconfiguration.

@mr3 mr3 closed this as completed Jul 15, 2022
@AB027GT
Copy link

AB027GT commented Feb 20, 2024

Can you please post solution how you resolve it. I am having same issue

@ronnyfm
Copy link

ronnyfm commented Feb 26, 2024

Please ignore ths issue. I have fixed it, misconfiguration.

Can you share what did you change to fix it? Thanks.

@DQinYuan
Copy link

DQinYuan commented Apr 7, 2024

Can you please post solution how you resolve it. I am having same issue

@outscale-mdr
Copy link

Hello,

I did have the same issue. The problem was that I misread the documentation. server-username and server-password are actually the name of the environment variable (and not the value) that contain repectively the username and the password. (see here)

Instead of having:

- name: Set up Apache Maven Central
      uses: actions/setup-java@v4
      with: # running setup-java again overwrites the settings.xml
        ...
        server-username: ${{secrets.username}}

Do this:

- name: Set up Apache Maven Central
      uses: actions/setup-java@v4
      with: # running setup-java again overwrites the settings.xml
        ...
        server-username: THIS_IS_A_VARIABLE_USERNAME
- name: Publish
      run: mvn deploy
      env:
        THIS_IS_A_VARIABLE_USERNAME: ${{secrets.username}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

5 participants