olacabs / jackhammer

Jackhammer - One Security vulnerability assessment/management tool to solve all the security team problems.
https://jch.olacabs.com/userguide
Other
718 stars 162 forks source link

Error while cloning repo from gitlab #98

Open zee7han opened 6 years ago

zee7han commented 6 years ago

I am getting the error as "Invalid repo/repo is not accessible" while scanning the project. this Error occurs because of the file "jackhammer/web/app/app/workers/git_scan_worker.rb" in line 25.

Just showing like that unable to clone the repository

kmadhusudhan commented 6 years ago

@zee7han 1) You need to give the complete GitHub repository URL 2) if it is the private project, you need to configure your git credentials from the admin page 3) Please do manual cloning in the terminal, if it works then give the same URL as the target

zee7han commented 6 years ago

@KMadhuSudhan

  1. It is a private repo.
  2. I configure the gitlab credentials successfully, it fetches all the information from the gitlab repos. but when I try to scan a project it shows me invalid repo URL error.
  3. when I checked for the MySQL DB there is a column "ssh_repo_url" but it stores the HTTP URL to the repo. when I try to scan it shows me invalid repo URL error.
  4. most probably its an error in "git_scan_worker.rb" file when it tries to clone the repository from the gitlab.
kmadhusudhan commented 6 years ago

column name is ssh_repo_url , but it holds the git http url . please check cloning inside docker,using git clone https://username:password@github.com/username/repo . if it is not working, then you need remove some special characters from your password