betterscan-ce
betterscan-ce copied to clipboard
Private github repo fails to fetch despite adding public ssh key to github account?
Am I missing something?
I have seen the instructions here https://github.com/marcinguy/betterscan-ce/issues/45
but I am able to add public ssh keys to my github account, so I believe that thread isn't relevant to me.
I have tried cloning from within dockerhub_worker_1_1 but I get Permission denied (publickey)
# git clone [email protected]:jopfre/xxxx.git
Cloning into 'xxxx'...
The authenticity of host 'github.com (140.82.113.3)' can't be established.
ECDSA key fingerprint is XXXXXXXX
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com,140.82.113.3' (ECDSA) to the list of known hosts.
[email protected]: Permission denied (publickey).
I added the public ssh key from betterscan dashboard > settings > git settings to https://github.com/settings/ssh/new
Am I missing a step perhaps?
Full log output:
[INFO / 2023-03-05 00:02:20] Running pre-analysis hooks for project aird (e55c2c0f7273437880aa58a4ea51d307).
[INFO / 2023-03-05 00:02:20] Fetching data for project aird (e55c2c0f7273437880aa58a4ea51d307).
[ERROR / 2023-03-05 00:02:21] Fetching data for project aird (e55c2c0f7273437880aa58a4ea51d307) failed!
[ERROR / 2023-03-05 00:02:21] Analysis of project aird (e55c2c0f7273437880aa58a4ea51d307) failed!
[ERROR / 2023-03-05 00:02:21] Traceback (most recent call last):
File "/srv/scanmycode/quantifiedcode/backend/tasks/project/analyze.py", line 42, in hook_step
settings.hooks.call(hook, project)
File "/srv/scanmycode/quantifiedcode/helpers/hooks.py", line 42, in call
hook(*args, **kwargs)
File "/srv/scanmycode/quantifiedcode/plugins/git/backend/tasks/fetch.py", line 100, in fetch_remote
raise IOError("Cannot fetch git repository!")
OSError: Cannot fetch git repository!
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/scanmycode/quantifiedcode/backend/tasks/project/analyze.py", line 76, in analyze_project
_analyze_project(project)
File "/srv/scanmycode/quantifiedcode/backend/tasks/project/analyze.py", line 92, in _analyze_project
hook_step(project, "project.analyze.fetch", "Fetching data")
File "/srv/scanmycode/quantifiedcode/backend/tasks/project/analyze.py", line 45, in hook_step
logger.error("Exception {} {}.".format(e.__class__.__name__, e.message))
AttributeError: 'OSError' object has no attribute 'message'
[INFO / 2023-03-05 00:02:20] Running pre-analysis hooks for project aird (e55c2c0f7273437880aa58a4ea51d307).
[INFO / 2023-03-05 00:02:20] Fetching data for project aird (e55c2c0f7273437880aa58a4ea51d307).
[ERROR / 2023-03-05 00:02:21] Fetching data for project aird (e55c2c0f7273437880aa58a4ea51d307) failed!
[ERROR / 2023-03-05 00:02:21] Analysis of project aird (e55c2c0f7273437880aa58a4ea51d307) failed!
[ERROR / 2023-03-05 00:02:21] Traceback (most recent call last):
File "/srv/scanmycode/quantifiedcode/backend/tasks/project/analyze.py", line 42, in hook_step
settings.hooks.call(hook, project)
File "/srv/scanmycode/quantifiedcode/helpers/hooks.py", line 42, in call
hook(*args, **kwargs)
File "/srv/scanmycode/quantifiedcode/plugins/git/backend/tasks/fetch.py", line 100, in fetch_remote
raise IOError("Cannot fetch git repository!")
OSError: Cannot fetch git repository!
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/scanmycode/quantifiedcode/backend/tasks/project/analyze.py", line 76, in analyze_project
_analyze_project(project)
File "/srv/scanmycode/quantifiedcode/backend/tasks/project/analyze.py", line 92, in _analyze_project
hook_step(project, "project.analyze.fetch", "Fetching data")
File "/srv/scanmycode/quantifiedcode/backend/tasks/project/analyze.py", line 45, in hook_step
logger.error("Exception {} {}.".format(e.__class__.__name__, e.message))
AttributeError: 'OSError' object has no attribute 'message'
@jopfre Thanks for your message.
Just pulled latest image and it seems to be working (as all the time I tested and by my daily usage)
See this:
Just make sure you just copy the public key correctly.
I used free GitHub and also paid (Enterprise or whatever it is called)
In you case the string should be:
Similar like here: ssh://[email protected]/topcodersonline/privatetest.git
Yours: ssh://[email protected]/jopfre/xxxx.git
It should convert it to it from also different formats, but maybe you hit some bug.
Community Edition is for developers that want to dig in, debug, modify it (are on their own)
If you want to use it professionally/at business I suggest to contact me for a price friendly PRO license (all features, 8-10x faster)
Contributors/partners are always welcome.
Happy scanning!