diff --git a/lib/util/git/index.ts b/lib/util/git/index.ts index ac735d03c5d0342a4123e1bac06feb413b19db38..c19deea75dae2c5ac36fa5c9e600615138929de6 100644 --- a/lib/util/git/index.ts +++ b/lib/util/git/index.ts @@ -837,6 +837,15 @@ export async function commitFiles({ error.validationMessage = `Renovate cannot push to its branch because branch protection has been enabled.`; throw error; } + if (err.message.includes('can only push your own commits')) { + const error = new Error(CONFIG_VALIDATION); + error.validationSource = branchName; + error.validationError = 'Bitbucket committer error'; + error.validationMessage = `Renovate has experienced the following error when attempting to push its branch to the server: "${String( + err.message + )}"`; + throw error; + } if (err.message.includes('remote: error: cannot lock ref')) { logger.error({ err }, 'Error committing files.'); return null;