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

Plugin fails to load with ssh error: "Permission denied (publickey)" #674

Open
SylvanasCry opened this issue Jul 30, 2023 · 0 comments
Open

Comments

@SylvanasCry
Copy link

SylvanasCry commented Jul 30, 2023

I'm configuring semantic-release in a repo, but I get the error. Plugin fails to load.

GITHUB_TOKEN is definitely passed, other plugins work correctly.

Error:

[4:00:32 PM] [semantic-release] › ✔  Loaded plugin "fail" from "@semantic-release/github"
...
...
2023-07-30T16:00:32.331Z semantic-release:get-git-auth-url Verifying ssh auth by attempting to push to  [email protected]:SylvanasCry/schema-registry-ajv.git
2023-07-30T16:00:32.421Z semantic-release:git Error: Command failed with exit code 128: git push --dry-run --no-verify [email protected]:SylvanasCry/schema-registry-ajv.git HEAD:master
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
    at makeError (file:///home/runner/work/schema-registry-ajv/schema-registry-ajv/node_modules/semantic-release/node_modules/execa/lib/error.js:60:11)

release.yml

name: Release
on:
  push:
    branches:
      - master

permissions:
  contents: read # for checkout

jobs:
  release:
    name: Release
    runs-on: ubuntu-latest
    permissions:
      contents: write # to be able to publish a GitHub release
      issues: write # to be able to comment on released issues
      pull-requests: write # to be able to comment on released pull requests
      id-token: write # to enable use of OIDC for npm provenance
    steps:
      # ...
      # ...
      # ...
      - name: Release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
        run: npm run semantic-release

package.json

  "release": {
    "branches": [
      "master"
    ],
    "plugins": [
      "@semantic-release/commit-analyzer",
      "@semantic-release/release-notes-generator",
      [
        "@semantic-release/github",
        {
          "assets": [
            { "path": "dist/index.js", "label": "Module" },
            { "path": "README.md", "label": "Documentation" },
            { "path": "CHANGELOG.md", "label": "Documentation" },
            { "path": "LICENSE", "label": "License" }
          ]
        }
      ],
      "@semantic-release/npm",
      [
        "@semantic-release/changelog",
        {
          "changelogFile": "CHANGELOG.md"
        }
      ],
      [
        "@semantic-release/git",
        {
          "assets": ["package.json", "CHANGELOG.md"],
          "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
        }
      ]
    ]
  },

image

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

No branches or pull requests

1 participant