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

Log the error message when git clone fails, not just the return code #1505

Merged
merged 1 commit into from May 12, 2021

Conversation

logworthy
Copy link
Contributor

@logworthy logworthy commented Feb 23, 2021

I was trying to run the below command and getting a git error:

cookiecutter(template='https://github.com/drivendata/cookiecutter-data-science')

The current behavior only displays the return code of the git process:

subprocess.CalledProcessError: Command '['git', 'clone', 'https://github.com/drivendata/cookiecutter-data-science']' returned non-zero exit status 128.

I think it would be helpful to print the actual git output:

Cloning into 'cookiecutter-data-science'...
fatal: unable to access 'https://github.com/drivendata/cookiecutter-data-science/': SSL certificate problem: unable to get local issuer certificate

For what it's worth, I was then able to resolve the error (on windows) by setting the below:

git config --global http.sslbackend schannel

More info: https://stackoverflow.com/questions/23885449/unable-to-resolve-unable-to-get-local-issuer-certificate-using-git-on-windows

Copy link
Member

@simobasso simobasso left a comment

LGTM

@simobasso
Copy link
Member

simobasso commented Apr 22, 2021

Hey @logworthy 👋 ,

We just restored the CI 🎉 . Could you please rebase your pr so we can proceed to merge it?

Thanks

@simobasso simobasso added the enhancement This issue/PR relates to a feature request. label Apr 26, 2021
@ssbarnea ssbarnea merged commit 210cefb into cookiecutter:master May 12, 2021
19 checks passed
@simobasso simobasso mentioned this pull request May 15, 2021
cagonza6 pushed a commit to cagonza6/cookiecutter that referenced this pull request Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue/PR relates to a feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants