问题描述
我正在尝试在GitHub上的Go项目上使用CircleCI,并使用Go项目的默认模板。
I'm trying to use CircleCI on a Go project on GitHub with the default template for Go projects.
作为参考,这是默认 .circleci / config.yml
看起来像:
For reference, here's what the default .circleci/config.yml
looks like :
version: 2
jobs:
build:
docker:
- image: circleci/golang:1.12.7-buster
working_directory: /go/src/github.com/Permaweb/Host
steps:
- checkout
- run: go get -t -u -v ./...
- run: go test -v ./...
作业运行时,我得到一个与代码本身完全无关的错误。
When the job runs, I get an error that's totally unrelated to the code itself.
agent key RSA SHA256:L1iUIhjfKejEONe0TFU3TaWkNwE2O0xWF/09K7P8WnA returned incorrect signature type
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> develop
错误发生在 git期间在与
。 master
不同的分支上的CircleCI上拉
The error happens during a git pull
on CircleCI on a branch that's different from master
.
我该如何解决
推荐答案
这里有两个问题,分别和独立。
There are two issues here, which are separate and independent.
代理密钥返回的签名类型不正确警告表示正在使用的SSH代理返回了无效数据。
The "agent key returned incorrect signature type" warning means that the SSH agent that's being used returned invalid data.
使用RSA SSH密钥时,可以使用以下几种哈希算法之一进行签名:SHA-1,SHA-256或SHA-512。最初仅支持SHA-1,因此每次使用RSA密钥都意味着您正在使用SHA-1。但是,SHA-1较弱,因此添加了更强大的哈希算法。
When you use an RSA SSH key, you can sign with one of several hash algorithms: SHA-1, SHA-256, or SHA-512. Originally, only SHA-1 was supported, and so every use of an RSA key implied that you were using SHA-1. However, SHA-1 is weak, so additional, stronger hash algorithms were added.
此消息表示SSH连接使用具有不同签名的RSA密钥协商了连接算法,即SHA-256或SHA-512。但是,SSH代理在被要求为该连接进行签名时,提供了SHA-1签名,该签名不符合代理协议。
This message means that the SSH connection negotiated a connection using an RSA key with a different signature algorithm, either SHA-256 or SHA-512. However, the SSH agent, when asked to make the signature for that connection, provided an SHA-1 signature, which isn't in compliance with the agent protocol.
此该消息并不是本质上致命的消息,但是如果远程端不支持SHA-1签名,则可能选择拒绝您的连接。
This message isn't intrinsically fatal, although the remote side may choose to reject your connection if it doesn't support SHA-1 signatures.
您看到的另一条消息,即来自Git的消息,表示您正在尝试执行 git pull
命令,而没有为该分支设置遥控器。在这种情况下,这是因为您在现有存储库上使用 go get
,因为该命令将尝试更新现有存储库。
The other message you're seeing, the message from Git, means that you're trying to perform a git pull
command without having a remote for that branch set up. In this case, that's because you're using go get
on an existing repository, since that command will attempt to update the existing repository.
如果只想安装依赖项,运行 go build
通常会自动为您完成此操作,因此无需运行去获取
专门用于此目的。如果您需要更复杂的东西,则应该使用Git本身,因为 go get
并非旨在用于复杂情况。
If you just want to install dependencies, running go build
will usually do that automatically for you, so there's no need to run go get
specifically for that purpose. If you need something more complex, then you should use Git itself for that, since go get
is not designed to be used in complex situations.
这篇关于代理密钥RSA SHA256:...返回了错误的签名类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!