从Jenkins Rsync到Google Compute Engine实例

拉杰比·梅迪(Rjaibi Mejdi)

我想将文件从Jenkins发送到我在Google Compute引擎实例中的实例,我在jenkins的配置中添加了一个版本:

rsync -vrzhe "ssh -i /var/lib/jenkins/.ssh/google_compute_engine -o UserKnownHostsFile=/dev/null -o CheckHostIP=no -o StrictHostKeyChecking=no" . login@Host:/var/www

我得到这个错误:

Checking out Revision 59cf9dd819fe2168c4c40f716707d58b2b99e251 (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 59cf9dd819fe2168c4c40f716707d58b2b99e251
> git rev-list 59cf9dd819fe2168c4c40f716707d58b2b99e251 # timeout=10
[Platform] $ /bin/sh -xe /tmp/hudson4502433356962914860.sh
+ rsync -vrzhe 'ssh -i /var/lib/jenkins/.ssh -o UserKnownHostsFile=/dev/null -o 

CheckHostIP=no -o StrictHostKeyChecking=no' . login@Host:/var/www
   StrictHostKeyChecking=no' . login@host:/var/www
   ssh: connect to host host port 22: Connection timed out
   rsync: connection unexpectedly closed (0 bytes received so far) [sender]
   rsync error: unexplained error (code 255) at io.c(601) [sender=3.0.7]
   Build step 'Exécuter un script shell' marked build as failure
   Finished: FAILURE

任何的想法

拉杰比·梅迪(Rjaibi Mejdi)

问题出在我的公钥上,因此要解决此问题,您需要:

1-设置ssh密钥:运行

gcloud compute ssh example-instance

2-将.ssh / google_compute_engine.pub内容cp到GCE VM的authorized_key中

3-重新启动VM实例

谢谢你的帮助

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

SSH到Google Compute Engine实例失败

Google Compute Engine实例的GUI

实时更新Google Compute Engine实例类型

Google Compute Engine VM实例访问权限

Google Compute Engine-克隆实例

重命名Google Compute Engine VM实例

Google Compute Engine:增加实例的内存/ CPU

如何移植Google Compute Engine实例?

Google Cloud-Compute Engine,使用实例模板插入实例

带有永久磁盘的实例的Google Compute Engine快照失败

如何知道机器是否是Google Compute Engine实例

连接到Google Compute Engine实例以运行Python脚本

配置 Google Compute Engine 虚拟机实例

允许外部用户启动/停止Google Compute Engine VM实例

为什么在Google Compute Engine VM实例中禁用“创建”?

在Google Compute Engine实例启动时运行mongoDB

如何获取新的Google Compute Engine实例的ssh密钥?

是否可以动态分配 Google Compute Engine 实例?

无法删除Google Cloud Platform上的Compute Engine实例

在 Google Compute Engine 实例磁盘上设置标签

Google Compute Engine如何将新的外部IP地址绑定到实例

如何将Docker容器目录复制到Google Compute Engine实例

Google Compute Engine时区

如何从CircleCI部署到Google Compute Engine?

Google Cloud Compute Engine VM实例组始终自动修复为最大实例数

如何通过PHP App Engine应用程序在Google Compute Engine实例上创建cron作业?

App Engine启动Compute Engine实例-IllegalAccessError

允许Google Cloud Compute Engine实例将文件写入Google存储桶-Python

将Google colab连接到Google Compute Engine实例上的运行时