From 960980c1da5f729a5b721f84b23ca25ede748302 Mon Sep 17 00:00:00 2001 From: Wei He Date: Tue, 28 Apr 2020 21:42:44 -0400 Subject: [PATCH 1/2] fix: allow basic auth header overwrites GitHub Actions automatically set basic auth header overwriting access tokens supplied in HTTPS clone urls. Fix #18 --- github-sync.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-sync.sh b/github-sync.sh index 8144c2821..57b448c3f 100755 --- a/github-sync.sh +++ b/github-sync.sh @@ -23,7 +23,7 @@ fi echo "UPSTREAM_REPO=$UPSTREAM_REPO" echo "BRANCHES=$BRANCH_MAPPING" -# GitHub actions v2 no longer auto set GITHUB_TOKEN +git config --unset-all http."https://github.com/".extraheader git remote set-url origin "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY" git remote add tmp_upstream "$UPSTREAM_REPO" git fetch tmp_upstream From be39e29a3935e91501aa5aac0e60c01ea655197a Mon Sep 17 00:00:00 2001 From: Wei He Date: Sun, 23 Aug 2020 22:33:51 -0400 Subject: [PATCH 2/2] docs: add persist-credentials: false Fixes #18 --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e32c26e8f..863dd0d82 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,9 @@ jobs: repo-sync: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v2 + with: + persist-credentials: false - name: repo-sync uses: repo-sync/github-sync@v2 with: @@ -64,4 +66,4 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d -This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! \ No newline at end of file +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!