Skip to content

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

Merged
ssbarnea merged 1 commit intocookiecutter:masterfrom
logworthy:master
May 12, 2021
Merged

Log the error message when git clone fails, not just the return code#1505
ssbarnea merged 1 commit intocookiecutter:masterfrom
logworthy:master

Conversation

@logworthy
Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member

@simobasso simobasso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@simobasso
Copy link
Copy Markdown
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
@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.

3 participants