-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support for authenticating to private action repos #49
Comments
Also looking for this. Updating the await exec.exec('git', ['-c', `http.extraHeader=Authorization: Bearer ${github_token}`, 'remote', 'add', 'origin', `${github_prefix}${owner}/${repo}.git`]) Change the error to:
But still no success 👎 |
@danpowell88 FWIW I did figure this out - I ended up making a decent amount of edits to support caching of actions that are stored on an on-prem Github Enterprise Server instance, however I had to setup auth for public github.com too. As long as your github token has the required permissions this should work for you: - name: Run add action script
env:
GITHUB_TOKEN_EXTERNAL: ${{ secrets.GITHUB_CLOUD_PAT }}
run: |
git config --local user.email "[email protected]"
git config --local user.name "github-actions"
export GITHUB_TOKEN=$GITHUB_TOKEN_EXTERNAL
git config --global "url.https://${GITHUB_TOKEN}@github.com.insteadof" "https://github.com"
./script/add-action.sh ${{ inputs.action-author }}/${{ inputs.action-name }} |
Using this inside of an organisation where the actions repo are internal or private the scripts are unable to clone the git repo as it expects them to be public.
Any chance we can add a way to specify auth details to push through to git?
I may take a look if/when I get a chance but wanted to get any ideas on implementation first
This is what happens currently
The text was updated successfully, but these errors were encountered: