小编pri*_*oki的帖子

詹金斯:命令“ git rev-parse --is-inside-work-tree”

我已经在工作区中构建了.git,但是在尝试构建我的项目时却出现了此错误。

我使用Ubuntu,Jenkins和Git插件2.0.4。

Building in workspace /home/xxxx/Desktop/Jenkins
ERROR: Workspace has a .git repository, but it appears to be corrupt.
hudson.plugins.git.GitException: Command "git rev-parse --is-inside-work-tree" returned status code 128:
stdout: 
stderr: fatal: Not a git repository (or any of the parent directories): .git

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1183)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1160)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1156)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:972)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:982)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.hasGitRepo(CliGitAPIImpl.java:136)
    at hudson.plugins.git.GitAPI.hasGitRepo(GitAPI.java:186)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:830)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:878)
...
Cloning the remote Git repository
Cloning repository git://github.com/xxxxx/xxxxx.git
ERROR: Failed to clean the workspace
java.nio.file.AccessDeniedException: /home/xxxx/Desktop/Jenkins/.git
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) …
Run Code Online (Sandbox Code Playgroud)

git jenkins ubuntu-13.10

5
推荐指数
0
解决办法
3381
查看次数

如何使用 cbt 命令行连接到 bigtable 模拟器?

我运行了该命令gcloud beta emulators bigtable start,但是当我运行该命令时cbt listinstances,出现以下错误

获取实例列表:rpc 错误:code = 未实现 desc = 未知服务 google.bigtable.admin.v2.BigtableInstanceAdmin

如何使用cbt命令连接本地bigtable模拟器?

模拟器命令https://cloud.google.com/sdk/gcloud/reference/beta/emulators/bigtable/start

cbt 命令 https://cloud.google.com/bigtable/docs/go/cbt-reference

command-line google-cloud-bigtable

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

由于调用者没有权限,从 S3 到 GCS 的 Google StorageTransfer 作业失败

我尝试使用 API 将文件从 Amazon S3 传输到 Google Cloud Storage。我在 GCP 控制台上成功了,但是当我使用服务帐户凭据编写 Python 脚本时,我得到了HttpError 403 when requesting https://storagetransfer.googleapis.com/v1/transferJobs?alt=json returned "The caller does not have permission

此外,我的服务帐户已经是存储对象管理员。

我正在使用的脚本

import google.auth
import google_auth_httplib2
import google.oauth2.service_account
from googleapiclient.discovery import build


_DEFAULT_SCOPES = ('https://www.googleapis.com/auth/cloud-platform',)

credentials = (
                    google.oauth2.service_account.Credentials.from_service_account_file(
                        key_path, scopes=_DEFAULT_SCOPES)
                )

http = httplib2.Http()
http_authorized = google_auth_httplib2.AuthorizedHttp(
            credentials, http=http)

conn = build('storagetransfer', 'v1', http=http_authorized, cache_discovery=False)
now = datetime.datetime.utcnow()

project_id='projectid'
transfer_spec = {
    'awsS3DataSource': {
        'bucketName': 's3_bucket',
        'awsAccessKey': {
            'accessKeyId': 'key',
            'secretAccessKey': 'secret',
        }
    }, …
Run Code Online (Sandbox Code Playgroud)

python-3.x google-cloud-storage google-client google-cloud-platform

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

将数据流式传输到Bigquery与将数据上传到PubSub然后使用数据流将数据插入Bigquery之间的优缺点是什么?

据我所知,将数据流式传输到BigQuery会导致重复的行,因为它在这里提到https://cloud.google.com/bigquery/streaming-data-into-bigquery#real-time_dashboards_and_queries

另一方面,将数据上传到PubSub,然后使用数据流将数据插入Bigquery将阻止重复的行?此处还有一个实时数据分析教程https://cloud.google.com/solutions/real-time/fluentd-bigquery

那么还有什么其他优点和缺点,在什么情况下我应该使用数据流从PubSub传输数据

google-bigquery google-cloud-pubsub google-cloud-dataflow

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

How to automate upload APK from Jenkins to TestFairy

I could not figure out how to command Jenkins to upload an APK to Testfairy. I know that Testfairy has an API for this, see the link below:

http://blog.testfairy.com/how-to-upload-an-app-to-testfairy-via-api/

I'm new to this, how do I use the API?

android apk jenkins testfairy

2
推荐指数
1
解决办法
3063
查看次数

在 GCP Container-Optimized OS 上构建 go 可执行文件的 GOOS 和 GOARCH 值是什么

我正在编写一个脚本,它将从谷歌云存储下载可执行二进制文件并在谷歌云计算上执行它。

但是,我不知道使用命令构建可执行文件的正确值GOOSGOARCH环境变量是什么go build

go google-cloud-platform google-kubernetes-engine

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