Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Dependabot on private Project on private GitLab #688

Closed
pkolodziejczyk opened this issue Aug 16, 2021 · 2 comments
Closed

Running Dependabot on private Project on private GitLab #688

pkolodziejczyk opened this issue Aug 16, 2021 · 2 comments

Comments

@pkolodziejczyk
Copy link

Hi,

(I am new to most of the technology used here)

I have clone the project on the Docker image of ruby:last

Then I have rune the following command :

export GITLAB_ASSIGNEE_ID=pko
export GITLAB_HOSTNAME=https://**domain_of the gitlab_in_my network**
export GITLAB_ACCESS_TOKEN=**access_token_gitlab_of_my_private_gitlab*
export PACKAGE_MANAGER=maven
export PROJECT_PATH=*GroupName1*/*GroupName2*/*ProjectName*
export BRANCH=develop

bundle exec ruby ./generic-update-script.rb

warning: parser/current is loading parser/ruby30, which recognizes
warning: 3.0.1-compliant syntax, but you are running 3.0.2.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
Fetching maven dependency files for ArchiDev/Services/TaskService
/usr/local/lib/ruby/3.0.0/net/http.rb:987:in initialize': Failed to open TCP connection to https:443 (getaddrinfo: Name or service not known) (SocketError) from /usr/local/lib/ruby/3.0.0/net/http.rb:987:in open'
from /usr/local/lib/ruby/3.0.0/net/http.rb:987:in block in connect' from /usr/local/lib/ruby/3.0.0/timeout.rb:97:in block in timeout'
from /usr/local/lib/ruby/3.0.0/timeout.rb:107:in timeout' from /usr/local/lib/ruby/3.0.0/net/http.rb:985:in connect'
from /usr/local/lib/ruby/3.0.0/net/http.rb:970:in do_start' from /usr/local/lib/ruby/3.0.0/net/http.rb:959:in start'
from /usr/local/lib/ruby/3.0.0/net/http.rb:1512:in request' from /usr/local/bundle/gems/httparty-0.18.1/lib/httparty/request.rb:145:in perform'
from /usr/local/bundle/gems/httparty-0.18.1/lib/httparty.rb:594:in perform_request' from /usr/local/bundle/gems/httparty-0.18.1/lib/httparty.rb:508:in get'
from /usr/local/bundle/gems/gitlab-4.17.0/lib/gitlab/request.rb:51:in block (2 levels) in <class:Request>' from /usr/local/bundle/gems/gitlab-4.17.0/lib/gitlab/client/branches.rb:32:in branch'
from /usr/local/bundle/gems/dependabot-common-0.142.0/lib/dependabot/clients/gitlab_with_retries.rb:67:in public_send' from /usr/local/bundle/gems/dependabot-common-0.142.0/lib/dependabot/clients/gitlab_with_retries.rb:67:in block in method_missing'
from /usr/local/bundle/gems/dependabot-common-0.142.0/lib/dependabot/clients/gitlab_with_retries.rb:82:in retry_connection_failures' from /usr/local/bundle/gems/dependabot-common-0.142.0/lib/dependabot/clients/gitlab_with_retries.rb:64:in method_missing'
from /usr/local/bundle/gems/dependabot-common-0.142.0/lib/dependabot/clients/gitlab_with_retries.rb:47:in fetch_commit' from /usr/local/bundle/gems/dependabot-common-0.142.0/lib/dependabot/file_fetchers/base.rb:72:in commit'
from /usr/local/bundle/gems/dependabot-common-0.142.0/lib/dependabot/file_fetchers/base.rb:359:in _full_specification_for' from /usr/local/bundle/gems/dependabot-common-0.142.0/lib/dependabot/file_fetchers/base.rb:369:in _fetch_file_content'
from /usr/local/bundle/gems/dependabot-common-0.142.0/lib/dependabot/file_fetchers/base.rb:139:in fetch_file_from_host' from /usr/local/bundle/gems/dependabot-maven-0.142.0/lib/dependabot/maven/file_fetcher.rb:32:in pom'
from /usr/local/bundle/gems/dependabot-maven-0.142.0/lib/dependabot/maven/file_fetcher.rb:25:in fetch_files' from /usr/local/bundle/gems/dependabot-common-0.142.0/lib/dependabot/file_fetchers/base.rb:64:in files'
from ./generic-update-script.rb:157:in <main>' /usr/local/lib/ruby/3.0.0/net/http.rb:987:in initialize': getaddrinfo: Name or service not known (SocketError)
from /usr/local/lib/ruby/3.0.0/net/http.rb:987:in open' from /usr/local/lib/ruby/3.0.0/net/http.rb:987:in block in connect'
from /usr/local/lib/ruby/3.0.0/timeout.rb:97:in `block in timeout'

First I did think it's was because the certificate was unknown. So I added the certificate to the system.
And the wget can access the welcomepage of the GitLab.

But, I still get that error.

Maybe the error speak more here ? #hope

@pkolodziejczyk
Copy link
Author

With some p (print) in files

GITLAB_HOSTNAME -> shouldn't have the protocole
PROJECT_PATH -> should be the ID of the project (for genereting GITLAB_HOSTNAME/api/v4/projects/ID_PROJECT)
GITHUB_ACCESS_TOKEN -> Missing

if internal maven read :
dependabot/dependabot-core#3806

if HTTPS problem :
https://stackoverflow.com/questions/1113422/how-to-bypass-ssl-certificate-verification-in-open-uri
https://gist.github.com/siruguri/66926b42a0c70ef7119e via

I still have Issue with

/usr/local/lib/ruby/3.0.0/net/http.rb:987:in initialize': execution expired (Faraday::ConnectionFailed) ... from /usr/local/bundle/gems/dependabot-common-0.142.0/lib/dependabot/clients/github_with_retries.rb:96:in public_send'
...
/usr/local/lib/ruby/3.0.0/net/http.rb:987:in `initialize': execution expired (Net::OpenTimeout)

On this object :

<Faraday::Env @method=:get @url=#<URI::HTTPS https://api.github.com/repos/spring-projects/spring-boot/contents/> @request=#<Faraday::RequestOptions timeout=5, open_timeout=2> @request_headers={"User-Agent"=>"Octokit Ruby Gem 4.20.0", "Accept"=>"application/vnd.github.v3+json", "Content-Type"=>"application/json", "Authorization"=>"token MY_TOKEN"} @ssl=#<Faraday::SSLOptions verify_mode=1> @response=#<Faraday::Response:0x000055845ab6e5c0 @on_complete_callbacks=[]>>

I don't know why I can't access github

@pkolodziejczyk
Copy link
Author

Last issue was on the network proxy (of my entreprise):

Here is what solved it :

export http_proxy=**MyProxy**
export https_proxy=**MyProxy**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant