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
    • 最新
    • 标签
主页 / user-392179

Justas's questions

Martin Hope
Justas
Asked: 2017-03-21 06:05:09 +0800 CST

使用 gitlab-runner 重启 tomcat

  • 0

我有 .gitlab-ci.yml 配置:

deploy-integration:
  stage: deploy
  script:
    - cp target/example.war /var/webapps
    - service tomcat7 restart

但是执行没有成功,因为:

$ service tomcat7 restart
您需要 root 权限才能运行此脚本
错误:构建失败:退出状态 1

用 gitlab-runner 重新启动 tomcat 的最佳方法是什么?我只想为这个命令授予 gitlab-runner 权限。

permissions
  • 1 个回答
  • 1300 Views
Martin Hope
Justas
Asked: 2016-12-29 06:12:02 +0800 CST

使用 HTTPS 的 Gitlab git clone - 无法获取本地颁发者证书

  • 5

当我使用git clone https://my.example.com/gitlab/java/repository.git时,我得到

克隆到“存储库”...
致命:无法访问“ https://my.example.com/gitlab/java/repository.git”:SSL
证书问题:无法获取本地颁发者 证书

如果我设置它工作正常git config --global http.sslVerify false

Gitlab 与 Apache2 和 SSL 一起使用,后者转发到 gitlab-workhorse。有关配置的更多详细信息:用于存储库克隆的 Gitlab HTTPS URI 不起作用 - 无法验证 SSL 主机 - 致命:无法访问

我尝试添加 SSL 证书,因为它们与 Apache 配置中的相同,但它没有帮助:

nginx['ssl_certificate'] = "/etc/gitlab/ssl/my.example.com.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/my.example.com.key"

如何将其配置为通过 HTTPS 进行 git 操作而不禁用验证?

ssl git apache-2.4 gitlab eclipse
  • 1 个回答
  • 19794 Views
Martin Hope
Justas
Asked: 2016-12-27 02:12:34 +0800 CST

用于存储库克隆的 Gitlab HTTPS URI 不起作用 - 无法验证 SSL 主机 - 致命:无法访问

  • 2

当我制作 Eclipse -> 文件 -> 导入 -> 项目 -> 来自 Git 的项目 -> 克隆 URI -> 从 Gitlab 输入存储库 HTTPS URI 时,出现错误:

可能原因:
URL 不正确
没有网络连接(例如代理设置错误)
SSL 主机无法验证(在 Git 配置中设置 http.sslVerify=false)

我已经http.sslVerify false在 Eclipse 配置中添加了,但它仍然无法正常工作。

如果我git clone https://my.example.com/gitlab/root/repository.git在 cmd 中进行,我会得到:

克隆到“存储库”...
致命:无法访问“ https://my.example.com/gitlab/root/repository.git ”:请求的 URL 返回错误:500

Gitlab 生产日志显示:

Projects::GitHttpController#info_refs 作为 HTML
参数处理:{"service"=>"git-upload-pack", "namespace_id"=>"java", "project_id"=>"project.git"}
完成 500 内部服务器102 毫秒内出错(ActiveRecord:2.5 毫秒)
JWT::DecodeError(Nil JSON Web 令牌):
lib/gitlab/workhorse.rb:120:in 'verify_api_request!'
app/controllers/projects/git_http_client_controller.rb:154:in 'verify_workhorse_api!'
lib/gitlab/request_profiler/middleware.rb:15:in 'call'
lib/gitlab/middleware/go.rb:16:in 'call'

SSH URL 运行良好。Gitlab 与 Apache2 和 HTTPS 一起使用。/etc/gitlab/gitlab.rb包含:

external_url ' https://my.example.com/gitlab '
web_server['username'] = 'apache' #'gitlab-www'
web_server['group'] = 'apache' #'gitlab-www'
nginx['enable '] = 假
独角兽['listen'] = '127.0.0.1'
独角兽['port'] = 9099

/etc/apache2/apache2.conf包含:

ProxyPass /gitlab http://127.0.0.1:9099/gitlab
ProxyPassReverse /gitlab http://127.0.0.1:9099/gitlab
RequestHeader add X-Forwarded-Proto https

使用的版本:

GitLab 8.14.5
GitLab Shell 4.0.3
GitLab Workhorse 1.1.1
GitLab API v3
Git 2.7.4

有关于类似问题的文章在 GitLab 上修复通过 HTTPS 进行克隆的问题,但修改/etc/gitlab/gitlab.rbgitlab-workhorse 配置没有帮助。

类似问题: 使用 HTTP(S) 和 Apache 作为反向代理的 git 操作时出现错误 500

如何解决这个问题呢?

ssl git apache-2.4 gitlab eclipse
  • 1 个回答
  • 6779 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