简体   繁体   English

Flutter/Git — 帮助替换 pubspec.yaml 中的 package

[英]Flutter/Git — Help replacing package in pubspec.yaml

I'm trying to compile the open source app at https://github.com/Zchandev/iChan .我正在尝试在https://github.com/Zchandev/iChan编译开源应用程序。 He gives instructions there, it seems straightforward.他在那里给出指示,看起来很简单。

At the step flutter pub get I get the following error:在步骤flutter pub get我收到以下错误:

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 "我给开发人员发了消息,他说:“ package 已移至https://github.com/mwaylabs/flutter-apns ,您需要编辑 pubspec.Z6EEDC03A68A692933C763E674 文件并替换它

Here are the contents of pubspec.yaml: https://pastebin.com/n0dr7sEM以下是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?有人可以帮助我了解要更改的内容吗?

Remove the pubspec.lock and ~/.pub-cache then try again.删除pubspec.lock~/.pub-cache然后再试一次。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM