dmnemec / copy_file_to_another_repo_action

This GitHub Action copies a file from the current repository to a location in another repository
Apache License 2.0
182 stars 201 forks source link

Fails to copy to a private repo. #64

Open oianj opened 2 years ago

oianj commented 2 years ago

I get: remote: Repository not found. But the repo can be accessed via my organization. I even forked this repo to put it inside my org thinking that might do the trick and got nothing. I've set the API_TOKEN_GITHUB, the path to the repo is correct but still it doesn't work. I feel like there's something simple I'm missing here. It used to work and just stopped one day.. one day well before I started this job :) If anyone has any advice here I'd love to have it. Thanks!

victor10x commented 2 years ago

Same issue here:

+ echo 'Cloning destination git repository'
+ git config --global user.email user@domain
+ git config --global user.name gh_username
+ git clone --single-branch --branch 'cicd/k8s-tooling_${github.run_number}' ***github.com/MyOrg/kubernetes-deployments.git /tmp/tmp.oPblFC
Cloning into '/tmp/tmp.oPblFC'...
remote: Repository not found.
fatal: repository 'https://github.com/MyOrg/kubernetes-deployments.git/' not found

The repo definitely exists, and I can confirm that the gh_username referenced above has access. I am using

env:
  API_TOKEN_GITHUB: ...

with that user's PAT.