Craft parts should close stdin when cloning git projects
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
### What needs to get done
1. Similar to `apt` calls ([source](https://github.com/canonical/craft-parts/blob/2559930585682ceec00fccb150d508e95918b7f4/craft_parts/packages/deb.py#L611)), craft-parts should close stdin when cloning git repos.
2. If a repo requires credentials, craft-parts should raise a user-friendly error both locally and in CI (`snapcraft remote-build` is a good test).
### Why it needs to get done
If a git repo requires credentials, craft-parts does not prevent block stdin. This produces unhelpful errors.
source: https://chat.canonical.com/canonical/pl/wdbbgdpiupdymyzgfwiuys8cge
Evaluation history
No evaluation history available.