bundle exec rake gitlab:shell:install dial tcp 34.64.4.17:443: io timeout command failed: {“GOBIN“=

tech2023-02-14  90

背景:

1、执行/usr/local/ruby/bin/bundle exec rake gitlab:Shell:install REDIS_URL=redis://127.0.0.1:6379 RAILS_ENV=production SKIP_STORAGE_VALIDATION=true 时出现如下报错

[git@springcloud--1 gitlab]$ /usr/local/ruby/bin/bundle exec rake gitlab:shell:install REDIS_URL=redis://127.0.0.1:6379 RAILS_ENV=production SKIP_STORAGE_VALIDATION=true --trace ** Invoke gitlab:shell:install (first_time) ** Invoke gitlab_environment (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute gitlab_environment ** Execute gitlab:shell:install mkdir -p /home/git/.ssh: OK chmod 700 /home/git/.ssh: OK mkdir -p /home/git/repositories: OK chmod ug+rwX,o-rwx /home/git/repositories: OK go: github.com/mattn/go-shellwords@v0.0.0-20190425161501-2444a32a19f4: Get https://proxy.golang.org/github.com/mattn/go-shellwords/@v/v0.0.0-20190425161501-2444a32a19f4.mod: dial tcp 34.64.4.17:443: i/o timeout command failed: {"GOBIN"=>"/home/git/gitlab-shell/go_build/bin", "GO111MODULE"=>"on", "GOPROXY"=>"https://proxy.golang.org"} go install ./cmd/... rake aborted! command failed: bin/compile /home/git/gitlab/lib/tasks/gitlab/shell.rake:49:in `block (5 levels) in <top (required)>' /home/git/gitlab/lib/tasks/gitlab/shell.rake:47:in `each' /home/git/gitlab/lib/tasks/gitlab/shell.rake:47:in `block (4 levels) in <top (required)>' /home/git/gitlab/lib/tasks/gitlab/shell.rake:18:in `chdir' /home/git/gitlab/lib/tasks/gitlab/shell.rake:18:in `block (3 levels) in <top (required)>' /home/git/gitlab/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/task.rb:273:in `block in execute' /home/git/gitlab/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/task.rb:273:in `each' /home/git/gitlab/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/task.rb:273:in `execute' /home/git/gitlab/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/task.rb:214:in `block in invoke_with_call_chain' /usr/local/ruby/lib/ruby/2.5.0/monitor.rb:235:in `mon_synchronize' /home/git/gitlab/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/task.rb:194:in `invoke_with_call_chain' /home/git/gitlab/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/task.rb:183:in `invoke' /home/git/gitlab/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:160:in `invoke_task' /home/git/gitlab/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:116:in `block (2 levels) in top_level' /home/git/gitlab/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:116:in `each' /home/git/gitlab/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:116:in `block in top_level' /home/git/gitlab/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:125:in `run_with_threads' /home/git/gitlab/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:110:in `top_level' /home/git/gitlab/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:83:in `block in run' /home/git/gitlab/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling' /home/git/gitlab/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:80:in `run' /home/git/gitlab/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>' /home/git/gitlab/vendor/bundle/ruby/2.5.0/bin/rake:23:in `load' /home/git/gitlab/vendor/bundle/ruby/2.5.0/bin/rake:23:in `<top (required)>' /usr/local/ruby/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:74:in `load' /usr/local/ruby/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:74:in `kernel_load' /usr/local/ruby/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:28:in `run' /usr/local/ruby/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/cli.rb:463:in `exec' /usr/local/ruby/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' /usr/local/ruby/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command' /usr/local/ruby/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch' /usr/local/ruby/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/cli.rb:27:in `dispatch' /usr/local/ruby/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start' /usr/local/ruby/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/cli.rb:18:in `start' /usr/local/ruby/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/exe/bundle:30:in `block in <top (required)>' /usr/local/ruby/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors' /usr/local/ruby/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/exe/bundle:22:in `<top (required)>' /usr/local/ruby/bin/bundle:23:in `load' /usr/local/ruby/bin/bundle:23:in `<main>' Tasks: TOP => gitlab:shell:install [git@springcloud--1 gitlab]$

1、配置go代理

go env -w GO111MODULE=on go env -w GOPROXY='https://goproxy.cn,https://goproxy.io' [git@springcloud--1 gitlab]$ go env GO111MODULE="on" GOARCH="arm64" GOBIN="" GOCACHE="/home/git/.cache/go-build" GOENV="/home/git/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="arm64" GOHOSTOS="linux" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/git/go" GOPRIVATE="" GOPROXY="https://goproxy.cn,https://goproxy.io" GOROOT="/usr/lib/golang" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_arm64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/dev/null" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build799029558=/tmp/go-build -gno-record-gcc-switches" [git@springcloud--1 gitlab]$

2、尝试修改

[git@springcloud--1 gitlab-shell]$ vim /home/git/gitlab-shell/support/go_build.rb 'GOPROXY' => 'https://goproxy.io'

这样修改后,当再次运行1中的命令时,该文件会被覆盖

哪位有解决方案?

最新回复(0)