semantic-release: The authenticity of host 'github.com can't be established

Current behavior

When I run “npx semantic release” on CircleCI it asks for “github.com” connection established after that my CI job is truncated, which is rare because before I ran it on CircleCI for a previous workflow and everything works fine without that issue.

Expected behavior

it must follow the normal process

Environment

  • semantic-release version: 15.13.3, I’m using “npx semantic release” in CircleCI

  • CI environment: CircleCI

  • Plugins used:

    @semantic-release/changelog": "^3.0.2",
    "@semantic-release/commit-analyzer": "^6.1.0",
    "@semantic-release/git": "^7.0.8",
    "@semantic-release/github": "^5.2.9",
    "@semantic-release/release-notes-generator": "^7.1.4"
  • semantic-release configuration:
module.exports = {
  branch: 'master',
  plugins: [
    '@semantic-release/commit-analyzer',
    '@semantic-release/release-notes-generator',
    '@semantic-release/changelog',
    [
      '@semantic-release/github',
      {
        assets: ['build/**']
      }
    ],
    '@semantic-release/git'
  ]
}
  • CI logs:
#!/bin/bash -eo pipefail
npx semantic-release
[8:52:42 PM] [semantic-release] › ℹ  Running semantic-release version 15.13.3
[8:52:42 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/changelog"
[8:52:42 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/github"
[8:52:42 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/git"
[8:52:42 PM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[8:52:42 PM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[8:52:42 PM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/changelog"
[8:52:42 PM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/git"
[8:52:42 PM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/github"
[8:52:42 PM] [semantic-release] › ✔  Loaded plugin "success" from "@semantic-release/github"
[8:52:42 PM] [semantic-release] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[8:52:42 PM] [semantic-release] › ✔  Run automated release from branch master
The authenticity of host 'github.com (192.30.253.113)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? 

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 16 (6 by maintainers)

Commits related to this issue

Most upvoted comments

@travi Agreed. I migrated to Travis, no problems there.

The fix for me was to change my repository.url field in my package.json to use the https version of my repo instead of the git+ssh one.

For me I had to manually execute these steps before running semantic-release:

- run: mkdir -p ~/.ssh      
- run: ssh-keyscan github.com >> ~/.ssh/known_hosts

This was based off of the Circle CI docs: https://circleci.com/docs/2.0/gh-bb-integration/#establishing-the-authenticity-of-an-ssh-host

See PR https://github.com/btroncone/ngrx-store-localstorage/pull/193

@Jerska you saved me, took me a half day to find your comment, but I did, thank you!

The fix for me was to change my repository.url field in my package.json to use the https version of my repo instead of the git+ssh one.

I would add though that my repository url was git@ not git+ssh@ and I still needed to change it to https. The break occurred when we had to update from 17.0.1 to 17.2.3, was then able to go up to 17.4.3.

Here is a hackish workaround:

mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config

Add it before npx semantic-release step.