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

Does not work for private repositories #81

Open
e8johan opened this issue Feb 6, 2021 · 8 comments
Open

Does not work for private repositories #81

e8johan opened this issue Feb 6, 2021 · 8 comments

Comments

@e8johan
Copy link

e8johan commented Feb 6, 2021

When trying to push to a private repository (the same repo that the action is run from), I get a "fatal: repository 'https://github.com//.git/' not found". I've tried using both secrets.GITHUB_TOKEN, and a PAT (via secrets.DEPLOY_PAT). I'm not sure if I'm doing somethign wrong, but I suspect that it might come down to the repo being private.

@nsheff
Copy link

nsheff commented Mar 16, 2021

it works for me for private repos with the GITHUB TOKEN so you must have something set up incorrectly.

@e8johan
Copy link
Author

e8johan commented Mar 26, 2021

I'm trying it from a private repo in a privae org. That might the case. Nevertheless, I managed to work around, so if nobody else encounters this, I'm ok with closing.

@samrith-s
Copy link

@e8johan How did you solve this? I've tried quite a few ways and still badly stuck with this

@Szer
Copy link

Szer commented May 4, 2021

@e8johan could you please share the workaround you mentioned?

@lukli11
Copy link

lukli11 commented Aug 26, 2021

Hi everyone, I fixed this in our repositories by removing the step and replacing it with:

        - name: Push Commit
          run: git push https://${{ secrets.GITHUB_PAT }}@github.com/<REPO_OWNER>/<REPO_NAME>.git

The repo owner is our organisation and the GITHUB_PAT is a personal access token. Hope this helps! 😉

@skew202
Copy link

skew202 commented Nov 30, 2021

Chances are you'r using actions/checkout@v2 already. It offers a solution to push a commit using the built-in token.

@jordyvaneijk
Copy link

I'm having the same issue as @e8johan. and am using this action in combination with jaumann/github-bumpversion-action@v0.0.7 Hope someone can shed some light on this issue because i'm stuck.

@yasirroni
Copy link

Hi everyone, I fixed this in our repositories by removing the step and replacing it with:

        - name: Push Commit
          run: git push https://${{ secrets.GITHUB_PAT }}@github.com/<REPO_OWNER>/<REPO_NAME>.git

The repo owner is our organisation and the GITHUB_PAT is a personal access token. Hope this helps! 😉

How to make the owner dynamically to the the PR maker?

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

8 participants