Skip to content

prek constantly restarts on hook initializing when repository doesn't exists / requires authentication #1173

@spaceone

Description

@spaceone

Summary

I had a typo in the repository URL.
prek restarts itself multiple times.

it displays:

Cloning https://git.example.org/infrastructure/pre-commit-hooks/pre-commit-foo@feat/initial
Cloning https://git.example.org/infrastructure/pre-commit-hooks/pre-commit-foo@feat/initial
⠇ Initializing hooks...       

while pre-commit asks for credentials:

[INFO] Initializing environment for https://git.example.org/infrastructure/pre-commit-hooks/pre-commit-foo.
Username for 'https://git.example.org': ^CInterrupted (^C): KeyboardInterrupt:                        
Check the log at /home/USER/.cache/pre-commit/pre-commit.log  

Platform

linux

Version

latest

.pre-commit-config.yaml

No response

Log file

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions