AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[gerrit](server)

Martin Hope
SSB
Asked: 2020-07-15 15:08:47 +0800 CST

ssh -p 29418 user@samehostip 失败

  • 1

我在同一台主机上设置 jenkins 和 gerrit,我需要做的一件事是让 gerrit 和 jenkins 相互通信。

当我添加主机的 IP 地址(比如 10.25.26.27)时,我无法让 gerrit 触发器连接到 10.25.26.27。为了调试,我尝试了:

ssh -p 29418 user@10.25.26.27 -v

已完成对 ssh-keygen 和复制 id_rsa.pub 的尽职调查。

上述命令的输出是:

debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 10.25.26.27 [10.25.26.27] port 29418.
debug1: Connection established.
debug1: identity file /home/user/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_rsa-cert type -1
debug1: identity file /home/user/.ssh/id_dsa type 2
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_dsa-cert type -1
debug1: identity file /home/user/.ssh/id_ecdsa type 3
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.10
debug1: Remote protocol version 2.0, remote software version GerritCodeReview_3.2.2 (APACHE-SSHD-2.4.0)
debug1: no match: GerritCodeReview_3.2.2 (APACHE-SSHD-2.4.0)
debug1: Authenticating to 10.25.26.27:29418 as 'user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: ecdh-sha2-nistp256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256-etm@openssh.com compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256-etm@openssh.com compression: none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:y/+sp8pk2QcG5EXarPQs3zZrmvbf23ZKp8BF6gtZHEY
debug1: Host '[10.25.26.27]:29418' is known and matches the ECDSA host key.
debug1: Found key in /home/user/.ssh/known_hosts:2
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory
debug1: Skipping ssh-dss key /home/user/.ssh/id_dsa - not in PubkeyAcceptedKeyTypes
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/user/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Offering ECDSA public key: /home/user/.ssh/id_ecdsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/user/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey).

但是,当我从另一个 IP 地址(例如 10.24.25.29)尝试相同的操作时,我可以成功连接。

我需要从同一主机运行 gerrit 和 jenkins。感谢有关调试此问题的帮助。

ssh jenkins gerrit
  • 1 个回答
  • 251 Views
Martin Hope
andi
Asked: 2017-12-30 03:54:03 +0800 CST

当我设置 gerrit.canonicalWebUrl 时,“页面没有正确重定向”

  • 1

从https://github.com/GerritCodeReview/docker-gerrit安装 Gerrit 以下Using Gerrit in production部分后,该字段自动设置为此值:

[gerrit]
        canonicalWebUrl = http://eac32ee72f2b/

我想在反向代理后面使用 Gerrit,所以我这样配置 Apache2:

ProxyPass / http://192.168.19.241:8080/ nocanon

这有效,但是一旦我设置gerrit.canonicalWebUrl为https://gerrit.example.com,我得到页面没有正确重定向并且浏览器中的 URL 变为https://gerrit.example.com//login/.

如果我尝试将规范的 web url 设置为https://gerrit.example.com/g/并将 Apache2 相应地更新为:

ProxyPass /g/ http://192.168.19.241:8080/g/ nocanon

我在浏览器中收到“未找到”消息,并且栏中的 URL 现在显示为https://gerrit.example.com/g//g//g//g//g//g//g//g//g//g//g//g//g//g//g//g//g//g//g//g//g. 如果我检查 HTTP 标头,对于页面的初始请求,https://gerrit.example.com/g我会得到 301 重定向到https://gerrit.example.com/g//g.

在所有情况下,配置httpd.listenUrl都是proxy-http://*:8080.

谁能告诉我我做错了什么?我想设置正确的 Web URL,因为它在通过 HTTP 检出存储库的链接中可见,也可能在其他地方可见。

gerrit
  • 1 个回答
  • 1080 Views
Martin Hope
fzerorubigd
Asked: 2015-12-08 06:16:18 +0800 CST

配置了 http 身份验证的 gerrit 的 rest api

  • 0

我有一个工作的 gerrit 安装,唯一的事情是,gerrit 配置了 HTTP 身份验证后端,并且 nginx 处理身份验证。

现在,我想使用 gerrit restapi(只是通过 curl 将 Verified 标签设置为特定用户)。为此,我需要在设置面板中使用 gerrit 生成的 http 密码。所以你可以看到问题。有两个不同的密码。首先我尝试为两者设置相同的密码,(nginx密码在我的控制范围内,gerrit不是)然后我更改尝试为/a/创建一个新位置(用于身份验证的gerrit前缀)并删除该路由上的nginx密码,还没有运气。最终的 nginx 配置是:

location /a/ {
        proxy_pass        http://127.0.0.1:8118;
        proxy_set_header  X-Forwarded-For $remote_addr;
        proxy_set_header  Host $host;
        auth_basic "Gerrit";
        proxy_set_header Authorization $http_authorization;
        proxy_pass_header  Authorization;
}

location / {
        proxy_pass        http://127.0.0.1:8118;
        proxy_set_header  X-Forwarded-For $remote_addr;
        proxy_set_header  Host $host;
        auth_basic "Gerrit";
        auth_basic_user_file /etc/nginx/conf.d/gerrit.htpasswd;
        proxy_set_header Authorization $http_authorization;
        proxy_pass_header  Authorization;
}

我的 gerrit 配置是:

[gerrit]
        basePath = git
        canonicalWebUrl = http://gerrit.example.com/
[database]
        type = postgresql
        hostname = 127.0.0.1
        database = reviewdb
        username = gerrit2
[index]
        type = LUCENE
[auth]
        type = HTTP
[sendemail]
        smtpServer = mail.vada.ir
        from = ${user} Code Review <git@vada.ir>
        smtpUser = git@vada.ir
        smtpPass = T7SMkUYRqMP

[container]
        user = gerrit2
        javaHome = /usr/lib/jvm/java-7-openjdk-amd64/jre
[sshd]
        listenAddress = *:29418
[httpd]
        listenUrl = proxy-http://127.0.0.1:8118/
[cache]
        directory = cache
[plugins]
        allowRemoteAdmin = true

如果我们可以保护它免于注册,则更改 gerrit 身份验证只是一种选择。

谢谢你。

gerrit
  • 1 个回答
  • 3310 Views
Martin Hope
Matthew Hoggan
Asked: 2014-07-10 21:42:27 +0800 CST

Gerrit 标签 - 已验证

  • 4

我已经启动并运行了 gerrit 我已经提交了我的第一个初始更改。但是,我只能在 Review 页面上看到 Code Review。我转到 All-Projects 的访问页面(我的项目从该页面继承其 ACL)并为管理员添加了标签验证。我登录到管理员帐户,但无法验证我的更改和推送。下面是我认为正确配置的屏幕截图,以及没有出现验证标签的屏幕截图。

显示验证标签以便我推送更改的正确方法是什么?

项目访问 没有验证标签

gerrit
  • 2 个回答
  • 2975 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve