Skip to content

Error: when SSH Port different from 22 #175

@federi95

Description

@federi95

Hi I'm trying to release my monorepo library using changesets-gitlab, comment stage goes well, but when it comes to release stage it results into an error.
I'm trying to debug this issue since in the .git/config I have

pushurl = git@HOST:PORT/REPO.git

where HOST is not gitlab, PORT is not 22 and REPO is ofc the repo

after pnpm changesets-gitlab command I got this:

[command]/usr/bin/git push origin HEAD:changeset-release/master --force
ssh: connect to host HOST port 22: Connection refused
fatal: Could not read from remote repository.

This happen here, run.ts:292

await gitUtils.push(versionBranch, { force: true })

This is the ci yaml

stages:
  - comment
  - release

before_script:
  - corepack enable
  - corepack prepare pnpm@latest --activate
  - pnpm i --no-frozen-lockfile

comment:
  image: node:lts-alpine
  stage: comment
  only:
    - merge_requests
  script: pnpm changesets-gitlab comment
  variables:
    GITLAB_TOKEN: '${GITLAB_TOKEN}'

release:
  image: node:lts-alpine
  stage: release
  only:
    - master
  script:
    - apk --no-cache add git openssh
    - cat .git/config
    - pnpm changesets-gitlab
  variables:
    INPUT_ONLY_CHANGESETS: 'true'
    INPUT_REMOVE_SOURCE_BRANCH: 'true'
    INPUT_CREATE_GITLAB_RELEASES: 'false'
    GITLAB_TOKEN: '${GITLAB_TOKEN}'
    INPUT_PUBLISH: pnpm build && pnpm run publish

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions