src-d / hercules

Gaining advanced insights from Git repository history.
Other
2.06k stars 146 forks source link

Will hercules not work with private git repositories? #371

Closed unabletodecide closed 3 years ago

unabletodecide commented 3 years ago

This is the command I ran and the error thrown:

./hercules --burndown --burndown-people --couples --feature=uast --dry-run --dump-dag doc/dag.dot https://xyz.git

2021/--/-- --:--:-- failed to open https://xyz.git: authentication required panic: failed to open https://xyz.git: authentication required

goroutine 1 [running]: log.Panicf(0x1484269, 0x15, 0xc0012b1a48, 0x2, 0x2) /home/travis/.gimme/versions/go1.13.6.linux.amd64/src/log/log.go:345 +0xc0 main.loadRepository(0x7fff44147ce1, 0x33, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4d0000c000139bb0) /home/travis/gopath/src/github.com/src-d/hercules/cmd/hercules/root.go:120 +0x4c9 main.glob..func3(0x22d4a60, 0xc0001d4700, 0x1, 0x8) /home/travis/gopath/src/github.com/src-d/hercules/cmd/hercules/root.go:218 +0x2f5 github.com/spf13/cobra.(Command).execute(0x22d4a60, 0xc0000320a0, 0x8, 0x8, 0x22d4a60, 0xc0000320a0) /home/travis/gopath/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:766 +0x2aa github.com/spf13/cobra.(Command).ExecuteC(0x22d4a60, 0xc000bb2800, 0xc000139f50, 0x839def) /home/travis/gopath/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852 +0x2ea github.com/spf13/cobra.(*Command).Execute(...) /home/travis/gopath/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800 main.main() /home/travis/gopath/src/github.com/src-d/hercules/cmd/hercules/root.go:516 +0x31

marcofranssen commented 3 years ago

maybe try with https://user@personal-access-token@xyz.git

unabletodecide commented 3 years ago

maybe try with https://user@personal-access-token@xyz.git

I tried this, however, it is still not asking me for authentication/password. I am running this command in a non-git folder and cannot configure username and password with gitconfig. The command I ran and output below:

./hercules --burndown --burndown-people --couples --feature=uast --dry-run --dump-dag doc/dag.dot https://username@provider.org/owner_name/repo_name.git 2021/03/18 11:43:17 failed to open https://username@provider.org/owner_name/repo_name.git: authentication required panic: failed to open https://username@provider.org/owner_name/repo_name.git: authentication required

goroutine 1 [running]: log.Panicf(0x1484269, 0x15, 0xc000b75a48, 0x2, 0x2) /home/travis/.gimme/versions/go1.13.6.linux.amd64/src/log/log.go:345 +0xc0 main.loadRepository(0x7ffece9f8cd6, 0x33, 0x0, 0x0, 0x0, 0x0, 0x0, 0x460000c000b75bb0) /home/travis/gopath/src/github.com/src-d/hercules/cmd/hercules/root.go:120 +0x4c9 main.glob..func3(0x22d4a60, 0xc000124800, 0x1, 0x8) /home/travis/gopath/src/github.com/src-d/hercules/cmd/hercules/root.go:218 +0x2f5 github.com/spf13/cobra.(Command).execute(0x22d4a60, 0xc0000320a0, 0x8, 0x8, 0x22d4a60, 0xc0000320a0) /home/travis/gopath/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:766 +0x2aa github.com/spf13/cobra.(Command).ExecuteC(0x22d4a60, 0xc0000bac00, 0xc000b75f50, 0x839def) /home/travis/gopath/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852 +0x2ea github.com/spf13/cobra.(*Command).Execute(...) /home/travis/gopath/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800 main.main() /home/travis/gopath/src/github.com/src-d/hercules/cmd/hercules/root.go:516 +0x31

unabletodecide commented 3 years ago

The remote repository authentication from hercules command has still not worked!

JUST FOR THE SAKE OF TESTING, I pulled all branches of the remote repository and ran the above command successfully.

What can I do with this dag.dot file? hercules command is not taking DAG as input. I ran the Hercules command on the pulled repo but the visualizations are sometimes transparent and sometimes I cannot save it.