* Check if a git error indicates authentication failure. * Used to provide enhanced error messages for auth failures.
(stderr: string)
| 765 | * Used to provide enhanced error messages for auth failures. |
| 766 | */ |
| 767 | function isAuthenticationError(stderr: string): boolean { |
| 768 | return ( |
| 769 | stderr.includes('Authentication failed') || |
| 770 | stderr.includes('could not read Username') || |
| 771 | stderr.includes('terminal prompts disabled') || |
| 772 | stderr.includes('403') || |
| 773 | stderr.includes('401') |
| 774 | ) |
| 775 | } |
| 776 | |
| 777 | /** |
| 778 | * Extract the SSH host from a git URL for error messaging. |