Fork-Sync-With-Upstream-action
Fork-Sync-With-Upstream-action copied to clipboard
could not read Username for 'https://github.com/': No such device or address error
Hello. I created one Github Actions file to fetch upstream changes. The script that I used it below. When I run in test mode, it works quite well and doesn't throw any error. When I change test_mode to false, it gives me this error:
The error that I get:
fatal: could not read Username for 'https://github.com/': No such device or address
ERROR: exit 128
Could not push changes to target repo.
Try running in test mode to verify your action input. If that does not help, please open an issue.
Resetting git config to previous settings.
May you help me to spot and fix my problem?
Thanks a lot.
Here my Github Actions file:
name: 'Upstream Sync'
on:
schedule:
- cron: '0 4 * * 1,2,3,4,5,6'
# scheduled at 07:00 every Monday and Thursday
workflow_dispatch: # click the button on Github repo!
jobs:
sync_latest_from_upstream:
runs-on: ubuntu-latest
name: Sync latest commits from upstream repo
steps:
# REQUIRED step
# Step 1: run a standard checkout action, provided by github
- name: Checkout target repo
uses: actions/checkout@v2
with:
# optional: set the branch to checkout,
# sync action checks out your 'target_sync_branch' anyway
ref: master
# REQUIRED if your upstream repo is private (see wiki)
persist-credentials: false
# REQUIRED step
# Step 2: run the sync action
- name: Sync upstream changes
id: sync
uses: aormsby/[email protected]
with:
target_sync_branch: master
# REQUIRED 'target_repo_token' exactly like this!
target_repo_token: ${{ secrets.GITHUB_TOKEN }}
upstream_sync_branch: master
upstream_sync_repo: OpenFOAM/OpenFOAM-dev
# Set test_mode true to run tests instead of the true action!!
test_mode: true
# Step 3: Display a sample message based on the sync output var 'has_new_commits'
- name: New commits found
if: steps.sync.outputs.has_new_commits == 'true'
run: echo "New commits were found to sync."
- name: No new commits
if: steps.sync.outputs.has_new_commits == 'false'
run: echo "There were no new commits."
- name: Show value of 'has_new_commits'
run: echo ${{ steps.sync.outputs.has_new_commits }}
Have you tried reading through the closed issues? I'm pretty sure this has come up a few times, but the fixes may have been different.
Yes, I checked closed issues as well, it seems like using v3 might fix the problem. I haven't tried it actually, but I may give it a try
Same problem, and the method in issue #45 don't work. Using v3.3.
My config file:
name: 'Upstream Sync'
on:
schedule:
- cron: '*/60 */8 * * *'
workflow_dispatch: # click the button on Github repo!
jobs:
sync_latest_from_upstream:
runs-on: ubuntu-latest
name: Sync latest commits from upstream repo
steps:
# REQUIRED step
# Step 1: run a standard checkout action, provided by github
- name: Checkout target repo
uses: actions/checkout@v2
with:
# optional: set the branch to checkout,
# sync action checks out your 'target_sync_branch' anyway
ref: patch-1
# REQUIRED if your upstream repo is private (see wiki)
persist-credentials: false
fetch-depth: 0
# REQUIRED step
# Step 2: run the sync action
- name: Sync upstream changes
id: sync
uses: aormsby/[email protected]
with:
target_sync_branch: patch-1
# REQUIRED 'target_repo_token' exactly like this!
target_repo_token: ${{ secrets.GITHUB_TOKEN }}
upstream_sync_branch: main
upstream_sync_repo: ccfddl/ccf-deadlines
upstream_repo_access_token: ${{ secrets.UPSTREAM_REPO_SECRET }}
# Set test_mode true to run tests instead of the true action!!
test_mode: false
upstream_pull_args: '--allow-unrelated-histories'
# Step 3: Display a sample message based on the sync output var 'has_new_commits'
- name: New commits found
if: steps.sync.outputs.has_new_commits == 'true'
run: echo "New commits were found to sync."
- name: No new commits
if: steps.sync.outputs.has_new_commits == 'false'
run: echo "There were no new commits."
- name: Show value of 'has_new_commits'
run: echo ${{ steps.sync.outputs.has_new_commits }}
Having the same issue here. Looked through the old issues and tried everything mentioned there as well.
Throwing my 2 cents in here too. Same error as drhcelik. Tried fixes in #45 but no luck.
Pushing synced data to target branch.
fatal: could not read Username for 'https://github.com/': No such device or address
ERROR: exit 128
Could not push changes to target repo.
Try running in test mode to verify your action input. If that does not help, please open an issue.
Me too
Please look on this PR.
Temporary you can apply a fix via:
uses: PeterVoronov/Fork-Sync-With-Upstream-action@remote_set-url_fix
Thanks for fixing this. I merged into v3.4
. It's currently pre-release, and if someone here can verify the fix I'll make it a full release.
https://github.com/marketplace/actions/upstream-sync?version=v3.4
Thanks for fixing this. I merged into
v3.4
. It's currently pre-release, and if someone here can verify the fix I'll make it a full release.https://github.com/marketplace/actions/upstream-sync?version=v3.4
You are always welcome!
And thanks for this package!
If it helps, I just used the 3.4 version and had the action run successfully. Thank you all for patching this up.
Thanks, will release fully