-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to clone git repo in pub get due to missing SSH key #99
Comments
Are you asking about support for private dart repository? |
Thanks for the quick reply, appreciated! We weren't keen on going down the private dart repository route as it would increase complexity. We were more interested in if sylph could handle ssh keys as AWS doesn't have a place that we could pass it in. |
Are you using a private git repository in your pubspec.yaml? Please confirm how you are using ssh. If understanding correctly, it should be a matter of duplicating your ssh config on the VM in Device Farm. This would involve uploading your private ssh key to the VM and configuring ssh on the VM. |
Yup, we are using a private git repository. Oh, interesting! OK, marvellous. I'll have a look at how I can upload my private key to the Device Farm VM and let you know how it goes. Thanks a bunch for your help! |
Uploading to the VM has to be done by Sylph. This requires adding support for passing the path to the ssh key to config file, adding the ssh key file to the uploaded bundle, then configuring ssh on the VM using the ssh key. |
OK - do you suggest that we fork the repo or is this something that could be included in the main sylph codebase? |
Yep, if you get it working, send a PR. Not a great fit for Sylph since appears not much call for this feature. But if PR works, may be good to have. |
Sound, cheers mate! We'll have a look. |
Cool! BTW: Sylph is using dummy ssh keys to get to a private fastlane match git server when building iOS debug ipa in CI (travis). Haven't looked at it in a while but may be possible to take a similar approach on Device Farm VM. https://github.com/mmcc007/sylph/tree/master/lib/resources/dummy-ssh-keys |
Hi, maybe a stupid question. Why do you run |
@tim-fdc basically yes |
I see. Was just wondering if it is possible to avoid the |
@tim-fdc May not be fully understanding how you are using local packages (in tests or in app, or both). I think, by default, all local packages are uploaded (probably only need local test packages). If you are using no local test packages, you could try forking sylph, remove the |
@mmcc007 We will try and come back with the result. |
@gwendiagram btw: as a workaround, if you edit your pubspec.yaml to use 'path' to your private packages, Sylph will copy that package into bundle for upload to Device Farm. Ultimately, the test running on device farm does not need non-test packages. So the ultimate fix is to create a test-only pubspec.yaml on the fly (#100) This would likely fix the case for local and private non-test packages |
We hit this same issue on Bitrise. We forked the repo and commented the lines here: sylph/lib/resources/script/local_utils.sh Line 53 in 8cbe88c
Then used the following to setup sylph in the runner/CI pub global activate --source git <git_url> |
Flutter allows Git repos to be referenced via
flutter pub get
(https://flutter.dev/docs/development/packages-and-plugins/using-packages) however, when sylph running on AWS tries toflutter pub get
it fails due to a missing ssh key. AWS doesn't have a place to put the SSH key (only for CodeCommit) and CodeMagic doesn't pass the ssh key when it pushes to AWS.Logs:
Is this something that could be fixed within sylph?
The text was updated successfully, but these errors were encountered: