Git Product home page Git Product logo

Comments (4)

libbys01 avatar libbys01 commented on June 3, 2024

@mikedrexler ☝️ who needs to see this to answer?

from codeql-container.

mikedrexler avatar mikedrexler commented on June 3, 2024

Hi @AndyG-0 ! I'm not sure what you are asking. Our virtual runners may be downloaded at https://github.com/actions/virtual-environments. Sorry if I misinterpret.

from codeql-container.

AndyG-0 avatar AndyG-0 commented on June 3, 2024

@mikedrexler Trying to run this locally. It appears that the first thing it does is try to connect to api.github.com:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 366, in connect
self.sock = ssl_wrap_socket(
File "/usr/lib/python3/dist-packages/urllib3/util/ssl
.py", line 370, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.8/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/usr/lib/python3.8/ssl.py", line 1040, in _create
self.do_handshake()
File "/usr/lib/python3.8/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1131)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /repos/github/codeql-cli-binaries (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/startup_scripts/setup.py", line 57, in
setup()
File "/usr/local/startup_scripts/setup.py", line 39, in setup
get_latest_codeql(args)
File "/usr/local/startup_scripts/setup.py", line 46, in get_latest_codeql
latest_online_version = codeql.get_latest_codeql_github_version()
File "/usr/local/startup_scripts/libs/codeql.py", line 80, in get_latest_codeql_github_version
return get_latest_github_repo_version("github/codeql-cli-binaries")
File "/usr/local/startup_scripts/libs/github.py", line 6, in get_latest_github_repo_version
repo = client.get_repo(repo)
File "/usr/local/lib/python3.8/dist-packages/github/MainClass.py", line 294, in get_repo
headers, data = self.__requester.requestJsonAndCheck(
File "/usr/local/lib/python3.8/dist-packages/github/Requester.py", line 275, in requestJsonAndCheck
return self.__check(*self.requestJson(verb, url, parameters, headers, input, self.__customConnection(url)))
File "/usr/local/lib/python3.8/dist-packages/github/Requester.py", line 335, in requestJson
return self.__requestEncode(cnx, verb, url, parameters, headers, input, encode)
File "/usr/local/lib/python3.8/dist-packages/github/Requester.py", line 388, in __requestEncode
status, responseHeaders, output = self.__requestRaw(cnx, verb, url, requestHeaders, encoded_input)
File "/usr/local/lib/python3.8/dist-packages/github/Requester.py", line 412, in __requestRaw
response = cnx.getresponse()
File "/usr/local/lib/python3.8/dist-packages/github/Requester.py", line 114, in getresponse
r = verb(url, headers=self.headers, data=self.input, timeout=self.timeout, verify=self.verify, allow_redirects=False)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /repos/github/codeql-cli-binaries (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)')))
Error 1 executing from command.
Exiting...
Command Output:
[2022-04-07 19:12:16,397] INFO: Starting setup...
[2022-04-07 19:12:17,141] INFO: Current codeql version: v2.7.6

This is failing of course because I'm behind a proxy and it's not configured in the image but our repos are on our GHES Server not github.com. It however looks like the python script is first connecting to the gh.com api. I would like to connect to our internal GHES vs github.com.

Besides local we could also use this image in our container based CI platforms as well.

It looks like the link provided is for virtual machines and not images, which would not work easily with our container based CI platforms.

If there are instructions on how to get the image to work with GHES, they would be appreciated.

from codeql-container.

jacobmsft avatar jacobmsft commented on June 3, 2024

Hey Andy, Mike, sorry for the late reply. Yes, right now the assumption in the script is that the cli and queries are being downloaded from the public github site. We can possibly introduce a override environment variable for each so the connection can be redirected. If you are interesting in sending a PR my way, please feel free. If not, I'll add it to my todo list and prioritize. Thanks for reporting the problem!

from codeql-container.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.