Internal Repository Not Reachable From Actions #26207
-
I have a trio of internal repositories in my organization. In the package.json of Repository A is a dependency on the contents of Repository B. Repository C is just like B. When I run yarn or npm locally, I have no problems with the installation of the dependencies. However when I trigger a workflow that is intended to install dependencies then do a build, the process fails. The output looks like this:
I have tried several approaches to fixing this including using a PAT with Secrets on Repository A. That PAT was given all permissions except for creating GPG keys, and Org Admin. I have also tried using SSH Key and putting the private key in Repository A Secrets and the deploy key in Repository B. This seems like a big missing feature of Actions if there is no way to accomplish. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hey! Can you show the command that you are calling that gives the error? GitHub, in general, supports the ability to use a private repo as a dependency of another private repo so I think the culprit is the command itself. |
Beta Was this translation helpful? Give feedback.
-
This is the command that fails. I have tried the setup-node action as well.
OAUTH_TOKEN is not a replace key in our system yet, so it’s right in there. This works on development machines. |
Beta Was this translation helpful? Give feedback.
-
Hi @elihuntington , I can reproduce the same with below code:
Did you use ‘actions/checkout@v2’ at prior step as well? ‘actions/checkout@v2’ will persist the GITHUB_TOKEN credential to the repo config to make git operations. Please use ‘actions/checkout@v1’ instead. Or if you use v2, please add ‘persist-credentials: false’ in the action args. Please check the link for more details. If the issue still persists, please share a repo sample or total yaml to help further investigation. Thanks. |
Beta Was this translation helpful? Give feedback.
-
This did fix it for me! Since I am in a private org, I had to clone the checkout/v1 action into my |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Hi @elihuntington ,
I can reproduce the same with below code:
Did you use ‘actions/checkout@v2’ at prior step as well? ‘actions/checkout@v2’ will persist the GITHUB_TOKEN credential to the repo config to make git operations. Please use ‘actions/checkout@v1’ instead. Or if you use v2, please add ‘persist-credentials: false’ in the action args. Please check the link for more details.
If the issue still persists, please share a repo sample or total yaml to help further investigation.
Thanks.