我正在尝试将 docker 容器推送到 GCP 上的 ArtifactRegistry,但我在步骤中遇到错误Push Docker Image to Artifact Registry
拒绝:资源“projects/PROJECT_ID/locations/asia-south1/repositories/images”的权限“artifactregistry.repositories.uploadArtifacts”被拒绝(或者可能不存在)错误:进程已完成,退出代码为1。
name: Build image and push to Artifact Registry of GCP
on:
push:
branches:
- master
jobs:
build-push-artifact:
name : Build and push Artifact Registry
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.ACCOUNT_KEY }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- name: 'Use gcloud CLI'
run: 'gcloud info'
- name: build Docker Image
run: docker build -t …Run Code Online (Sandbox Code Playgroud) google-cloud-platform github-actions google-artifact-registry
我是使用提供程序包进行颤振状态管理的新手。有多少不同的原因生成这些类型的异常以及如何修复它,此异常是在didChangeDependency中调用getFollowing() 方法时生成的。
跟随.dart
class Follows with ChangeNotifier{
List<Follow> _following =[];
String userid;
String token;
List<Follow> get followingUser{
return [..._following];
}
void updates(String token,String userid){
this.userid = userid;
this.token = token;
}
Future<void> getFollowing(String id) async {
final response = await http.get("${Domain.ADDRESS}/user/following/$id",headers: {"auth-token" : this.token});
final data =json.decode(response.body)["following"] as List;
List<Follow> followingData =[];
data.forEach((user){
followingData.add(Follow(
id: user["_id"],
username: user["username"],
fullname: user["fullname"],
imageUrl: user["imageUrl"],
followerCount : (user["followers"] as List).length
));
});
_following = [...followingData];
notifyListeners();
}
.........
} …Run Code Online (Sandbox Code Playgroud) flutter ×1