remote: Invalid username or password.
DasLixou opened this issue · 8 comments
Error: The deploy step encountered an error: The process '/usr/bin/git' failed with exit code 128 ❌
/usr/bin/git push --force ***github.com/Backlang-Org/backlang-org.github.io.git github-pages-deploy-action/ksvz3d2wh:gh-pages
remote: Invalid username or password.
It says that the username or password is invalid. I didnt touch the file for a week but since 2 days it just spamming that error.
Repository: https://github.com/Backlang-Org/backlang-org.github.io
It looks like your personal access token isn't scoped properly to provide enough permissions to deploy to this organization. The username/password error is just a generic authentication failed message.
Hi @JamesIves,
I am experiencing the same problem at the moment.
Here's the debug log from the action in case this is helpful:
##[debug]Evaluating condition for step: 'Publish Report'
##[debug]Evaluating: always()
##[debug]Evaluating always:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Publish Report
##[debug]Loading inputs
##[debug]Evaluating: github.token
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'token'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Loading env
Run JamesIves/github-pages-deploy-action@v4.3.4
╭━━━╮╭╮╭╮╱╭╮╱╱╭╮╱╱╭━━━╮
┃╭━╮┣╯╰┫┃╱┃┃╱╱┃┃╱╱┃╭━╮┃
┃┃╱╰╋╮╭┫╰━╯┣╮╭┫╰━╮┃╰━╯┣━━┳━━┳━━┳━━╮
┃┃╭━╋┫┃┃╭━╮┃┃┃┃╭╮┃┃╭━━┫╭╮┃╭╮┃┃━┫━━┫
┃╰┻━┃┃╰┫┃╱┃┃╰╯┃╰╯┃┃┃╱╱┃╭╮┃╰╯┃┃━╋━━┃
╰━━━┻┻━┻╯╱╰┻━━┻━━╯╰╯╱╱╰╯╰┻━╮┣━━┻━━╯
╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╭━╯┃
╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╰━━╯
╭━━━╮╱╱╱╱╱╭╮╱╱╱╱╱╱╱╱╭━━━╮╱╱╭╮
╰╮╭╮┃╱╱╱╱╱┃┃╱╱╱╱╱╱╱╱┃╭━╮┃╱╭╯╰╮
╱┃┃┃┣━━┳━━┫┃╭━━┳╮╱╭╮┃┃╱┃┣━┻╮╭╋┳━━┳━╮
╱┃┃┃┃┃━┫╭╮┃┃┃╭╮┃┃╱┃┃┃╰━╯┃╭━┫┃┣┫╭╮┃╭╮╮
╭╯╰╯┃┃━┫╰╯┃╰┫╰╯┃╰━╯┃┃╭━╮┃╰━┫╰┫┃╰╯┃┃┃┃
╰━━━┻━━┫╭━┻━┻━━┻━╮╭╯╰╯╱╰┻━━┻━┻┻━━┻╯╰╯
╱╱╱╱╱╱╱┃┃╱╱╱╱╱╱╭━╯┃
╱╱╱╱╱╱╱╰╯╱╱╱╱╱╱╰━━╯
💖 Support: https://github.com/sponsors/JamesIves
📣 Maintained by James Ives: https://jamesiv.es
🚀 Getting Started Guide: https://github.com/JamesIves/github-pages-deploy-action
❓ Discussions / Q&A: https://github.com/JamesIves/github-pages-deploy-action/discussions
🔧 Report a Bug: https://github.com/JamesIves/github-pages-deploy-action/issues
Checking configuration and starting deployment… 🚦
Deploying using Deploy Token… 🔑
Configuring git…
Git configured… 🔧
Starting to commit changes…
Creating worktree…
Creating target folder if it doesn't already exist… 📌
Checking if there are files to commit…
Force-pushing changes...
Running post deployment cleanup jobs… 🗑️
Error: The deploy step encountered an error: The process '/usr/bin/git' failed with exit code 1[2](***/runs/7672916568?check_suite_focus=true#step:6:2)[8](***/runs/7672916568?check_suite_focus=true#step:6:8) ❌
Notice: Deployment failed! ❌
::set-output name=deployment-status::failed
##[debug]='failed'
##[debug]Node Action run completed with exit code 1
##[debug]deployment_status='failed'
##[debug]Finishing: Publish Report
Anyone has a fix for this?
Like I provide the token
- uses: JamesIves/github-pages-deploy-action@v4.4.0
with:
token: ${{ secrets.ACCESS_TOKEN }}
i also set the permission for all actions for read and write and also set it explicit
permissions:
contents: write
Please show the permission scope for the access token.
What access token? It’s just the default GitHub secret token. In settings I gave actions read and write permissions just like in the docs. When you want to see the full action yml you can find it in the repo from top
Here’s a way that got me rid of this issue. Seems like GitHub has renamed their tokens
- token: ${{ secrets.ACCESS_TOKEN }}
+ token: ${{ secrets.GITHUB_TOKEN }}
What access token? It’s just the default GitHub secret token. In settings I gave actions read and write permissions just like in the docs. When you want to see the full action yml you can find it in the repo from top
Your example was using an access token based on the history. The action will default to the GitHub token if you do not provide the token parameter in your workflow file at all, so in this case you could probably just delete 'token: ...' altogether and get the same effect.
For next time please post examples in the discussion thread instead of providing a link as this helps others learn who search similar issues, it also helps preserve shareable knowledge.