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

Error: when SSH Port different from 22 #175

Open
federi95 opened this issue Apr 2, 2024 · 0 comments
Open

Error: when SSH Port different from 22 #175

federi95 opened this issue Apr 2, 2024 · 0 comments

Comments

@federi95
Copy link

federi95 commented Apr 2, 2024

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
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