semantic-release / semantic-release/git

change the default user for publishing the tags

Open
#443 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
339
Forks
75
Avg merge
5h 15m
Merged PRs (30d)
6

Description

Current behavior

Currently the default user used is semantic release bot. Since the default user does not have permissions to push to our repository main branch, our jenkins semantic release job fails with permission error.

Expected behavior

We would like the tags to be added by an already existing technical user instead of the default user semantic-release-bot.

We tried to use the "author": "technical user account id", in the package.json file to change the tag creation from default user to our existing technical user but no luck.

semantic-release version

v21.0.1

CI environment

Jenkins

Plugins used

No response

semantic-release configuration

{
"name": "",
"version": "0.0.1",
"description": "NPM configuration for global NPM Semantic Release",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"repository": {
"type": "git",
"url": "https://<repository_details>.git"
},
"devDependencies": {
"@commitlint/cli": "^15.0.0",
"@commitlint/config-conventional": "^15.0.0",
"commitlint-format-json": "^1.1.0",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"semantic-release": "^18.0.1"
},
"release": {
"branches": [
"<branch_name>"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md"
}
],
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md",
"package.json"
],
"message": "chore(release): [ci skip] ${nextRelease.version} \n\n${nextRelease.notes}"
}
]
]
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
}
}

CI logs

error: failed to push some refs to 'https:/.git'
14:45:45 at makeError (/usr/lib/node_modules/@semantic-release/git/node_modules/execa/lib/error.js:60:11)
14:45:45 at handlePromise (/usr/lib/node_modules/@semantic-release/git/node_modules/execa/index.js:118:26)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the release configuration in package.json and the @semantic-release/git plugin behavior, then review the Jenkins failure showing the push rejection. Determine how the publishing identity is selected and whether the requested technical-user behavior can be specified. Done means release tags push successfully under the configured technical account without breaking the existing release flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, javascript
Domain
devops, release
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.