标签: google-source-repositories

将代码推送到谷歌源存储库错误

将更改推送到我的云源存储库时出现以下错误。

remote: INVALID_ARGUMENT: Request contains an invalid argument.
remote: [type.googleapis.com/google.rpc.LocalizedMessage]
remote: locale: "en-US"
remote: message: "Invalid authentication credentials. Please generate a new identifier: https://source.developers.google.com/new-password"      
remote:
remote: [type.googleapis.com/google.rpc.RequestInfo]
remote: request_id: "xxxxx"
fatal: unable to access 'https://source.developers.google.com/p/xxx/repository/': The requested URL returned error: 400
Run Code Online (Sandbox Code Playgroud)

然后我继续生成新密码并将其存储在.gitcookies文件中,但我仍然遇到相同的错误。

git google-cloud-platform google-cloud-source-repos google-source-repositories

7
推荐指数
1
解决办法
1773
查看次数

前往Google的Cloud Source Repository获取

制作两个不同的go模块

  1. source.cloud.google.com/me/a

  2. source.cloud.google.com/me/b

随着source.cloud.google.com/me/common作为共同LIB依赖(共享模式)

我正在尝试go get source.cloud.google.com/me/common(甚至手动将其写入go.mod文件中),但我一直收到以下错误:

package source.cloud.google.com/me/common: 
unrecognized import path "source.cloud.google.com/me/common" 
(parse https://source.cloud.google.com/me/common?go-get=1: no go-import meta tags ())
Run Code Online (Sandbox Code Playgroud)

我已经gcloud设置为能够使用app deploy和创建新的源存储库。我尝试设置sshGoogle Cloud,并尝试使用手动凭据。这既不能在本地使用,也不能在Google Cloud build服务中使用。

我想做两件事:

  1. 能够go get依靠source.cloud.google.com/me/common
  2. 能够将其集成go get到我的App Engine自动构建渠道中。

任何帮助,将不胜感激。

go gcloud google-cloud-source-repos google-source-repositories go-get

6
推荐指数
1
解决办法
158
查看次数

Google Cloud Functions-是否可以将来自其他GCP项目存储库的代码部署到Cloud Function中?

我想在项目A中部署Google Cloud Function,但是我希望源文件是我在项目B中的Google Cloud Source Repository中保存的文件。这可能吗?

谢谢,

python google-cloud-platform google-cloud-functions google-source-repositories

5
推荐指数
1
解决办法
197
查看次数

如何使用 Cloud Builds 为 Google Cloud Functions 运行 python 单元测试?

我正在尝试为我的谷歌云功能构建 CI/CD 管道。我所知道的是,我有带有 gcloud 和 git 的本地开发环境。我在本地环境中编写代码并拥有 cloudbuilds.yaml 文件。编写代码后,我将其推送到我有构建触发器的 Google 源代码库。它构建函数并部署它。

现在我也想要一些测试文件。这意味着每当我将它推送到源存储库时,它也应该运行测试并构建我的 main.py 文件,然后部署它。我拥有的 cloudbuild.yaml 文件是

steps:
- name: 'gcr.io/cloud-builders/gcloud'
  args:
  - functions 
  - deploy
  - FunctionName
  - --runtime=python37
  - --source=.
  - --entry-point=function
  - --trigger-topic=topic_name
  - --region=europe-west3 
Run Code Online (Sandbox Code Playgroud)

gcloud google-cloud-functions google-source-repositories google-cloud-build

4
推荐指数
1
解决办法
686
查看次数