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

Cannot push changes in GitHub Actions with custom user name and password #731

Open
Zordid opened this issue Apr 5, 2024 · 0 comments
Open

Comments

@Zordid
Copy link

Zordid commented Apr 5, 2024

Next issue on my journey from Jenkins to GitHub.
I need to use a different user for pushing to work around branch restrictions. As such, I have used customUsername and customPassword parameters on Jenkins.

In GH actions, I replaced the password with the token (PAT). But this does not seem to work. I cannot find a way to tell the plugin to use a PAT instead of username/password...

Any ideas?

Pushing all to remote: origin
remote message: error: GH006: Protected branch update failed for refs/heads/main.
error: Changes must be made through a pull request.

When I removed the branch protection, just to test what this would change, I see the actual commit is done using the runner user, not my other technical user I had mentioned in customUsername. So, somehow, this feature does not work with PATs...

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

1 participant