I\xc2\xb4m 尝试通过云构建触发器将 html 代码从一个云源存储库发布到 gcp 中的公共存储桶。但是,每次推送到主分支时,我都会在构建中遇到以下错误。
\ngeneric::invalid_argument: generic::invalid_argument: if \'build.service_account\' is specified, the build must either (a) specify \'build.logs_bucket\' (b) use the CLOUD_LOGGING_ONLY logging option, or (c) use the NONE logging option\n
Run Code Online (Sandbox Code Playgroud)\n我正在使用以下 cloudbuild.yaml
\nsteps:\n - name: gcr.io/cloud-builders/gsutil\n args: ["-m", "rsync", "-r", "-c", "-d", ".", "gs://somedomain.com"]\n
Run Code Online (Sandbox Code Playgroud)\n我认为这与与云构建关联的服务帐户有关。
\n此解决方案的教程 I\xc2\xb4m 如下: https: //cloud.google.com/community/tutorials/automated-publishing-cloud-build
\ngoogle-cloud-platform google-cloud-source-repos google-cloud-build
我们在谷歌云平台上托管git repo.我知道对于github.com,我们可以使用拉取请求进行代码审查,但谷歌云似乎没有提供.
我很奇怪:我如何在谷歌云平台上进行回购代码审查?
git pull-request google-cloud-platform google-cloud-source-repos
我正在尝试使用Jenkins进行CI/CD.我开发了一个Python烧瓶应用程序.我正在将此应用程序部署到Google App Engine中.到目前为止,我正在使用gcloud app deploy app.yaml
命令将应用程序部署到Google App Engine.
此应用程序的代码存在于Google Cloud Source Repository中.
由于对git(Google Cloud Source Repository)的身份验证需要Google OAuth,因此我安装了Google OAuth凭据插件
现在我面临两个问题
致命:无法调用com.google.jenkins.plugins.source.GoogleRobotUsernamePassword.writeObject():无法序列化com.google.jenkins.plugins.source类的com.google.jenkins.plugins.source.GoogleRobotUsernamePasswordModule $ ForRemote#凭据.GoogleRobotUsernamePasswordModule $ ForRemote ----调试信息----消息:无法调用com.google.jenkins.plugins.source.GoogleRobotUsernamePassword.writeObject()cause-exception:java.lang.RuntimeException cause-message:序列化失败com.google.jenkins.plugins.source.GoogleRobotUsernamePasswordModule $ ForRemote类com.google.jenkins.plugins.source.GoogleRobotUsernamePasswordModule的凭据$ ForRemote -------------------- ----------- java.lang.UnsupportedOperationException:出于安全原因拒绝编组org.joda.time.DateTime; 请参阅 https://jenkins.io/redirect/class-filter/ at hudson.util.XStream2 $ BlacklistedTypesConverter.marshal(XStream2.java:543)at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69 )com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)at com.thoughtworks.xstream.core.AbstractReferenceMarshaller $ 1.convertAnother(AbstractReferenceMarshaller.java:84)
问题:如何在Jenkins中验证Google Cloud Source存储库?在Jenkins中使用Google Cloud Source存储库需要哪些步骤?插件?
google-app-engine jenkins google-cloud-platform google-cloud-source-repos
我正在尝试使用Google Cloud Source资源库作为远程资源库。我遵循了所有过程,以使用Google Cloud SDK身份验证方法进行身份验证,该方法允许我不使用SSH密钥(如他们所说)。
问题是:Permission denied (publickey) fatal: Could not read from remote repository.
尝试时总是收到消息git push --all google
。
该gcloud
命令位于Windows PATH(C:\Users\xxxxx\AppData\Local\Google\Cloud SDK\
;)中,并且我是Google Cloud中项目的所有者,因此我的用户具有足够的权限。
我知道此消息通常是一个简单的SSH密钥问题,可以通过将我的公共密钥添加到项目中来解决,但是该方法应该在没有ssh密钥的情况下也可以工作,因此我想了解自己在做什么。
这是我按照Google Cloud Source Repository过程执行的前两个命令:
gcloud init && git config --global credential.https://source.developers.google.com.helper gcloud.cmd
git remote add google ssh://username@gmail.com@source.developers.google.com:2022/p/my-website-project/r/my_website
Run Code Online (Sandbox Code Playgroud)
这两个效果很好。
也许有人可以帮助我找到解决方法。
谢谢。
git google-cloud-platform windows-10 google-cloud-source-repos
谷歌是否计划在谷歌云存储库上启用拉取请求?我们喜欢在 GCP 中使用这些存储库,但需要在我们的开发过程中使用拉取请求(坦率地说,我们对为什么没有启用它们感到惊讶和好奇)。所以此时我们想知道我们是否需要迁移或者他们是否计划添加此功能。
使用 GCP CSR,是否可以将存储库的默认分支更改为master
其他分支?除了首先在 CSR UI 中显示的分支之外,这对功能没有太大影响。不过,我可以在 GitHub 中更改它。
有没有办法在同一个Google云项目中添加多个git存储库?
我使用 Google Source Repository 来存储我的 Google Cloud Functions。(基本上由 Google 托管的 Git 存储库)
我的一个函数需要访问一个私有的 Google Sheet 文件,因此我创建了一个服务帐户。(权限太多,因为很难理解我们应该赋予服务帐户哪些确切的权限,而且以后也很难更新,但我离题了)
现在,出于显而易见的原因,显然不建议将服务帐户 JSON 文件存储在 git 存储库本身中。这是它的样子(从值中剥离)
{
"type": "service_account",
"project_id": "",
"private_key_id": "",
"private_key": "",
"client_email": "",
"client_id": "",
"auth_uri": "",
"token_uri": "",
"auth_provider_x509_cert_url": "",
"client_x509_cert_url": ""
}
Run Code Online (Sandbox Code Playgroud)
我一直在寻找环境变量来配置函数或类似的东西,但没有找到任何东西。跟踪密钥(因此可能会在多个存储库中复制该文件)听起来确实不是一个好主意。但我还没有找到任何“正确”的方法来做到这一点。由于 Google Functions 的工作方式,除了 env 变量之外,我想不出其他任何东西。
将更改推送到我的云源存储库时出现以下错误。
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
我正在尝试构建一个Dockerfile,通过pip将需求安装到它构建的容器中.我认为可能无法在谷歌的SDK /云控制台中设置某些内容.我收到此错误:
me@cloud-q2smart:~/github/jokepkg/test$ sudo pip install -r test-ggl-install/requirements.txt
Obtaining funniest from git+https://source.developers.google.com/p/cloud-q2smart/r/jokepkg#egg=funniest-0.1 (from -r test-ggl-install/requirements.txt (line 1))
Updating ./src/funniest clone
git: 'credential-gcloud.sh' is not a git command. See 'git --help'.
Username for 'https://source.developers.google.com':
Run Code Online (Sandbox Code Playgroud)
该消息看起来像是试图将'credential-gcloud.sh'传递给git,而git正在响应它不知道它应该对它意味着什么.看起来谷歌设置用于身份验证的一些内部手段已经破裂.
我真的很想从私人回购中正确安装它.我不希望开发团队因为身份验证机制被破坏而不得不将其流程更改为更麻烦的东西.
...但它很棘手......因为pip在幕后做了一些事情来调用git,看起来谷歌正试图在幕后做一些事情来告诉git如何进行身份验证.
我创建了一个项目,试图在谷歌云源中的私人仓库中安装一个简单的python包.运行它的说明如下:
( Start up google cloud shell )
$ git clone https://github.com/jnorment-q2/jokepkg.git
# pull down my sample package
$ cd jokepkg
# ( create repo in cloud )
$ git remote add google https://source.developers.google.com/p/cloud-q2smart/r/jokepkg
$ git push google master
# Change to test directory …
Run Code Online (Sandbox Code Playgroud) git pip docker google-cloud-platform google-cloud-source-repos