0

I'm trying to compile the open source app at https://github.com/Zchandev/iChan. He gives instructions there, it seems straightforward.

At the step flutter pub get I get the following error:

compile@compile-VirtualBox:~/snap/flutter/common/flutter/iChan$ flutter pub get
Git error. Command: `git clone --mirror git@github.com:FloPMT/flutter-apns.git /home/compile/snap/flutter/common/flutter/.pub-cache/git/cache/flutter-apns-31bb8f58633cb76118f15fafa15ad338ddc962c1`
stdout:                                                                 
stderr: Cloning into bare repository '/home/compile/snap/flutter/common/flutter/.pub-cache/git/cache/flutter-apns-31bb8f58633cb76118f15fafa15ad338ddc962c1'...
Warning: Permanently added the RSA host key for IP address '140.82.112.3' to the list of known hosts.
git@github.com: Permission denied (publickey).                          
fatal: Could not read from remote repository.                           
                                                                        
Please make sure you have the correct access rights                     
and the repository exists.                                              
exit code: 128                                                          
pub get failed (server unavailable) -- attempting retry 1 in 1 second...

I messaged the dev and he says, "That package was moved to https://github.com/mwaylabs/flutter-apns, you need to edit pubspec.yaml file and replace it"

Here are the contents of pubspec.yaml: https://pastebin.com/n0dr7sEM

I don’t really know EXACTLY what he’s asking me to do, but I’ve tried a few things and none of them worked.

Can someone help me understand what to change?

flowhart
  • 3
  • 3
  • See if this works or not, [How to add a package from GitHub in Flutter?](https://stackoverflow.com/a/54023220) – Pathik Patel May 03 '21 at 13:20
  • Sorry I'm very new to any of this. It's not clear what the dev was instructing me to do, and the instructions in your link are even more unclear... :\ As far as I can tell the package has already been added, I simply need to replace it with the new one—I don't know how to do that with the information he gave me. – flowhart May 03 '21 at 14:14

1 Answers1

0

Remove the pubspec.lock and ~/.pub-cache then try again.

Morteza Rastgoo
  • 6,772
  • 7
  • 40
  • 61