You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a github repo action such that pushing / merging to main branch of this repo A, belonging to github account M, triggers a push of the code to another repo B, belonging to github account N. I've created a PAT in account N, with full access to all repos and all options (just to be sure access isn't the problem), and stored this token value in the secrets of account M. Now i'm using this workflow file
name: Sync to Account N
on:
push:
branches:
- main
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
- name: Print Git version
run: git --version
- name: Add remote target
run: |
echo "URL: https://${{ secrets.PATVALUE }}@github.com/accountN/repoB.git"
git remote add target https://${{ secrets.PATVALUE }}@github.com/accountN/repoB.git
git remote -v
- name: Test remote with verbose output
run: |
GIT_TRACE=1 GIT_CURL_VERBOSE=1 git ls-remote target
the error coming in 'Test remote with verbose output' is:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to create a github repo action such that pushing / merging to main branch of this repo A, belonging to github account M, triggers a push of the code to another repo B, belonging to github account N. I've created a PAT in account N, with full access to all repos and all options (just to be sure access isn't the problem), and stored this token value in the secrets of account M. Now i'm using this workflow file
the error coming in 'Test remote with verbose output' is:
I've tried using the PAT locally in terminal and accessing the repo B and it is working, which means PAT is not the problem. Can you please help?
Beta Was this translation helpful? Give feedback.
All reactions