Skip to content

Commit

Permalink
Changed it to http instead of https
Browse files Browse the repository at this point in the history
Signed-off-by: naveensrinivasan <[email protected]>
  • Loading branch information
naveensrinivasan committed Aug 4, 2024
1 parent c758034 commit 5ea60d7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/csv/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,13 @@ func SaveSBOMToFile(sbomContent, dir, repoName string) error {

// CloneRepo clones a Git repository using HTTP to a specified directory without history
func CloneRepo(repoURL, dir string) error {
// Convert HTTPS URL to HTTP
httpURL := strings.Replace(repoURL, "https://", "http://", 1)

// Clone the repository with depth 1 (shallow clone)
_, err := git.PlainClone(dir, false, &git.CloneOptions{
URL: repoURL,
Progress: os.Stdout,
Depth: 1, // Shallow clone
URL: httpURL,
Depth: 1, // Shallow clone
})
if err != nil {
return fmt.Errorf("failed to clone repository: %w", err)
Expand Down

0 comments on commit 5ea60d7

Please sign in to comment.