diff --git a/lib/workers/branch/index.js b/lib/workers/branch/index.js
index 8c65e35ecfab25cacf3ae66344565db36a89802a..98da4e15bc0e5679ef0ea11d7ff6ee8280999fe2 100644
--- a/lib/workers/branch/index.js
+++ b/lib/workers/branch/index.js
@@ -299,6 +299,13 @@ async function processBranch(branchConfig, prHourlyLimitReached, packageFiles) {
       logger.debug('Passing repository-changed error up');
       throw err;
     }
+    if (
+      err.message &&
+      err.message.startsWith('remote: Invalid username or password')
+    ) {
+      logger.debug('Throwing bad credentials');
+      throw new Error('bad-credentials');
+    }
     if (err.message === 'bad-credentials') {
       logger.debug('Passing bad-credentials error up');
       throw err;