-
Notifications
You must be signed in to change notification settings - Fork 413
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
Mockery failing to run when having private repositories as dependencies #619
Comments
Hi, please use the latest version of mockery to see if the problem still exists. |
For what it's worth (I know this issue seems stale) I have this issue intermittently as well. I am currently using v2.35.3 and see the same invalid package name for my private package import. I use the |
Same error |
After further investigation, I had an error that was caused by github not being properly configured to pull in private go repositories in the docker layer I was running mockery in, and after that was fixed this error went away. Maybe its possible to catch that error and print something more helpful? |
This problem seems centered around the docker containers specifically. This is not surprising to me. We should probably document how to configure the environment inside the container to properly allow pulling from private repos. I'm sure this is some simple credential modification that needs to be done on the git level. If anyone could share how they did this then I can look into adding it in the docs. |
@LandonTClipp seems like we can close the issue as #824 has been merged. |
Description
Mockery failing with private repositories
Mockery Version
2.14.0
Golang Version
1.18.3
Installation Method
Steps to Reproduce
docker run -e GOPRIVATE=$GOPRIVATE -v "$HOME/.gitconfig:/root/.gitconfig" -v "$PWD:/src" -w /src vektra/mockery -r --all --dir=./pkg/app/ports --output ./pkg/app/mocks
Expected Behavior
Mocks to be generated with mockery identifying my
.gitconfig
which has thattoken@<git_url>.insteadof <git_url>
Actual Behavior
If I replace mockery's entrypoint to
/bin/sh
, then run it in iterative mode, running the following commands:apk add git
go mod download
It works and the mocks got generated
The text was updated successfully, but these errors were encountered: