0

I have seen various answers to similar problems but have not yet found one that solves my problem.

I have a 3rd party dependency that requires a password to authenticate against its private git repo. Locally, this works fine, as it prompts for the password, so I can enter it and then install correctly. This is then cached somewhere so I don't need to re-enter it.

However, running pod install in CI on github actions, I get an error:

fatal: could not read Password for 'https://**@github.com': Device not configured

How can I provide the password credential non-interactively in the CI so that I can install this dependency via my pod install?

A note - I am using React Native

Thank you for any assistance in advance!

I have tried a solution suggested here where I attempt to add the remote like so:

git remote set-url origin https://{username}:{password}@github.com/{username}/project.git

I have also tried this with only the password. However it doesn't work.

1 Answers1

0

If you're able to get the https://user:password@github.com syntax working locally, then you should be able to set the password as an encrypted secret in GitHub Actions. https://docs.github.com/en/actions/security-guides/encrypted-secrets has some additional detail on where and how to do this, but the gist is that your secret is encrypted at rest; imported as an environment variable when the action runs; and available for the script to use as often as necessary (in case you have multiple external repos you need to import).

Jim Redmond
  • 4,139
  • 1
  • 14
  • 18