Pushing Workflows to GitHub

Problem description:
When I push from Replit to Github, if there is a new GitHub Workflow (a YAML file in a .github folder) it fails because Replit does not have permission to create new Workflows. Replit should request permission to create / modify Workflows.

Here is the error:
! [remote rejected] master → master (refusing to allow a GitHub App to create or update workflow .github/workflows/auto-minify.yml without workflows permission)
error: failed to push some refs to ‘GitHub - CallumCM/CallumCM.github.io


I’ll be happy to put this in as a feature request on your behalf. In the mean time, are you able to grant Replit permission from the Github side?

1 Like

I can’t find where to grant Replit permission in Github, don’t know but it isn’t have workflows edit permission

@AdamElchert3 So sorry I did not see your response, unfortunately I am also unable to manually edit the permissions of the Replit app on the GitHub side—at least as far as I’ve found. Thanks!

+1 to this one. Getting the same error when trying to add a GitHub action to my repository from Replit. I don’t see where/how I can grant the Replit app permission to manage workflows in GitHub.

Hi, I recently ran across this issue myself and found a workaround with gh, GitHub’s official command line tool.

In your repl shell type “gh” and it will ask if you want nix to install gh cli. Answer yes.

Once installed, you can use “gh auth login” to authenticate with GitHub. It will ask you a few questions. Here’s how I answered.

? What account do you want to log into? GitHub.com
? What is your preferred protocol for Git operations? HTTPS
? Authenticate Git with your GitHub credentials? Yes
? How would you like to authenticate GitHub CLI? Login with a web browser

It will present a one-time code and open a browser for you to login.

After that everything will work as expected.

You can use “gh auth logout” to clear the authentication token from your repl.

Hope that helps.