我一直在尝试编写一个定期轮询Google云端存储的脚本.这在我正常运行时工作正常,但如果我将其作为Jenkins中的构建步骤包含在内,则会403 Forbidden出错.这是因为gcloud auth loginJenkins用户没有完成任何过程,这需要复制验证码.我是如何使用Jenkins做的?
编辑:
我尝试了以下步骤:https: //cloud.google.com/storage/docs/authentication#service_accounts并下载了一个类似于以下内容的JSON密钥:
{"web":{"auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://accounts.google.com/o/oauth2/token","client_email":"....@project.googleusercontent.com","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/....@project.googleusercontent.com","client_id":"....project.googleusercontent.com","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs"}}
Run Code Online (Sandbox Code Playgroud)
这很奇怪,因为所有的链接都指向像bad request, invalid request......我一定做错了.我跑的命令是:
gcloud auth activate-service-account ...@project.googleusercontent.com --key-file /var/lib/jenkins/....project.googleusercontent.com.json
Run Code Online (Sandbox Code Playgroud) 我正在尝试在命令行上使用jmeter:
./jmeter.sh -n -t testplan.jmx -l log.jtl
Run Code Online (Sandbox Code Playgroud)
它可以工作8/10次,但有时会卡在消息中:waiting for possible shutdown message..。我正在使用CentOS 6和JMeter 2.9 r1437961版本。我的测试计划有两个线程组,这些线程组配置为从GUI连续运行。关于问题可能有什么建议?
我需要生成 EC Diffie Hellman 密钥对。我正在使用名为 curve 的 secp256r1 和 OpenSSL。到目前为止,这是我所拥有的:
unsigned char *ecdh(size_t *secret_len)
{
EVP_PKEY_CTX *pctx, *kctx;
EVP_PKEY_CTX *ctx;
unsigned char *secret;
EVP_PKEY *pkey = NULL, *peerkey, *params = NULL;
/* NB: assumes pkey, peerkey have been already set up */
/* Create the context for parameter generation */
if(NULL == (pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_EC, NULL)))
printf("Error in EC key generation\n");
/* Initialise the parameter generation */
if(1 != EVP_PKEY_paramgen_init(pctx))
printf("Error in EC key generation\n");
/* We're going to use …Run Code Online (Sandbox Code Playgroud) c openssl encryption-asymmetric elliptic-curve diffie-hellman