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

Error during analysis #86

Closed
r3l1c7 opened this issue Jan 16, 2023 · 4 comments
Closed

Error during analysis #86

r3l1c7 opened this issue Jan 16, 2023 · 4 comments

Comments

@r3l1c7
Copy link

r3l1c7 commented Jan 16, 2023

On a private git repository, it has access, connects then gives:

dockerhub-server-1 | <blitzdb.backends.sql.queryset.QuerySet object at 0x7f58ae8c73d0>
dockerhub-server-1 | local variable 'branch' referenced before assignment
dockerhub-server-1 | Traceback (most recent call last):
dockerhub-server-1 | File "/srv/scanmycode/quantifiedcode/backend/api/resource.py", line 129, in handle
dockerhub-server-1 | handler_response = handler(*args, **kwargs)
dockerhub-server-1 | File "/srv/scanmycode/quantifiedcode/backend/decorators.py", line 381, in decorated_function
dockerhub-server-1 | return f(*args, **kwargs)
dockerhub-server-1 | File "/srv/scanmycode/quantifiedcode/backend/decorators.py", line 58, in decorated
dockerhub-server-1 | return func(*args, **kwargs)
dockerhub-server-1 | File "/srv/scanmycode/quantifiedcode/backend/decorators.py", line 124, in decorated_function
dockerhub-server-1 | return f(*args, **kwargs)
dockerhub-server-1 | File "/srv/scanmycode/quantifiedcode/backend/api/v1/badge.py", line 35, in get
dockerhub-server-1 | snapshot = get_snapshot(project, snapshot_id, raw=False, include=('project',))
dockerhub-server-1 | File "/srv/scanmycode/quantifiedcode/backend/helpers/snapshot.py", line 31, in get_snapshot
dockerhub-server-1 | snapshot = params['provider'](project, snapshot_id, raw=raw, only=only, include=include)
dockerhub-server-1 | File "/srv/scanmycode/quantifiedcode/plugins/git/backend/providers/snapshot.py", line 64, in resolve
dockerhub-server-1 | snapshot['branch'] = branch
dockerhub-server-1 | UnboundLocalError: local variable 'branch' referenced before assignment

@marcinguy
Copy link
Collaborator

@r3l1c7 Thanks for your message.

What git server are you using?

@r3l1c7
Copy link
Author

r3l1c7 commented Feb 1, 2023

just using github with ssh

@marcinguy
Copy link
Collaborator

@r3l1c7

Please take a look here for examples (different Git servers, including GitHub)

https://github.com/marcinguy/betterscan-ce/wiki/Repo-Cloning

If you use ssh, please use ssh format i.e

ssh://git@github.com/organization/repo.git

and make sure you have either added:

  • Public key from Settings->Git to the repo
  • Your Private key in Betterscan in Settings->Git

You should be also collaborator on the repo or owner.

This seem to be working. Cannot reproduce your issue.

What branches do you have in the project?

Also please be on a lookout on line breaking, new lines while copying/pasting keys.

@marcinguy
Copy link
Collaborator

Closing due to inactivity

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

3 participants
@marcinguy @r3l1c7 and others