Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

flutter passphrase in pubspec

Tags:

flutter

dart

Is is possible to use passphrase in pubspec.yaml dependencies:

dependencies:
  customFramework:
  url: [email protected]:nameandurl..
  ref: lkjdfksdjf
  path: package/nameofpackage

I get

[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights

And I am using passphrase which is the reason for the access problem. But then I need to add passphrase, I guess - but how?

Note: passphrase should probably not be in source code, but maybe there is a way.

like image 884
Chris G. Avatar asked Feb 01 '26 23:02

Chris G.


1 Answers

Your pubspec.yaml syntax is wrong. It should be

dependencies:
  customFramework:
    git:
      url: [email protected]:nameandurl..
      ref: lkjdfksdjf
      path: package/nameofpackage

If you use git@... paths (in contrary to https://...) setting up an SSH connection and connecting before running pub get should work.

https://help.github.com/articles/connecting-to-github-with-ssh/

like image 71
Günter Zöchbauer Avatar answered Feb 04 '26 15:02

Günter Zöchbauer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!