[英]git clone errors using against AWS CodeCommit from Jenkins
I have Jenkins build server running on Ubuntu and configured a windows machine as slave. 我有在Ubuntu上运行的Jenkins构建服务器,并将Windows机器配置为从属。 To compile .net code, I have created jenkins jobs to run specifically on this windows slave.
为了编译.net代码,我创建了jenkins作业以专门在此Windows从站上运行。 On the windows machine (jenkins slave), I have installed GIT.
在Windows机器(詹金斯从站)上,我已经安装了GIT。 Upon successfully creation of SSH public key and uploaded in AWS, I am able to clone the repository from the command line.
成功创建SSH公钥并上传到AWS后,我可以从命令行克隆存储库。 But if I clone the same repo from the Jenkins job, I get the following error.
但是,如果我从詹金斯(Jenkins)工作中克隆相同的仓库,则会收到以下错误。
stderr: fatal: protocol error: bad line length character: logi
Here are my questions: 这是我的问题:
I tried to find answers from various sources but could not find any lead. 我试图从各种来源找到答案,但找不到任何线索。 Any thoughts on this?
有什么想法吗?
The jenkins job might be running as a different user to that which you were logged in as. jenkins作业可能以与您登录时不同的用户身份运行。 Make sure you have the appropriate keys in the SSH config of that user.
确保在该用户的SSH配置中具有适当的密钥。
I haven't used Jenkins myself, but I've used Go CD ( https://www.go.cd/ ) and have run into this before, creating the key as the root
user, but pipelines/jobs actually run as the go
user. 我自己没有使用过Jenkins,但是我曾经使用过Go CD( https://www.go.cd/ )并在此之前遇到过,以
root
用户身份创建密钥,但是管道/作业实际上以go
用户。
On the EC2 instance, I have created a 'jenkins' user and ran the JNLP agent. 在EC2实例上,我创建了一个“ jenkins”用户并运行了JNLP代理。 Jenkins says as connected.
詹金斯说联系。 I have executed a windows command successfully.
我已经成功执行了Windows命令。 But when I use try to use 'GIT' plugin to pull the code from repository, I get the error mentioned in my original post.
但是,当我尝试使用'GIT'插件从存储库中提取代码时,我收到了原始帖子中提到的错误。
I have the same setup in my other laptop setup in office and I am able to pull code from 'GIT' without any problems. 我在办公室的其他笔记本电脑设置中具有相同的设置,并且能够从“ GIT”中提取代码而没有任何问题。 The main problem with this is that I cannot work from home as the laptop goes to sleep/shutdown by itself.
这样做的主要问题是笔记本电脑本身会进入睡眠/关机状态,因此我无法在家工作。 This setup is not ideal in most of the situations.
在大多数情况下,此设置都不理想。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.