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

change the default user for publishing the tags #443

Open
dsakilesh opened this issue Apr 24, 2023 · 1 comment
Open

change the default user for publishing the tags #443

dsakilesh opened this issue Apr 24, 2023 · 1 comment

Comments

@dsakilesh
Copy link

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/�[4m@semantic-release�[24m/git/node_modules/�[4mexeca�[24m/lib/error.js:60:11)
14:45:45 at handlePromise (/usr/lib/node_modules/�[4m@semantic-release�[24m/git/node_modules/�[4mexeca�[24m/index.js:118:26)

@travi travi transferred this issue from semantic-release/semantic-release Apr 25, 2023
@travi
Copy link
Member

travi commented Apr 25, 2023

configuration for commit details are available through the options found here: https://github.com/semantic-release/git#environment-variables

push rights are not directly related to the commit details, though, and depend on the credentials used to interact with your repository host from your jenkins pipeline

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

2 participants