Microsoft/vscode

Git Warning Message Incorrectly Styled as Error

Open

#280.834 aperta il 3 dic 2025

Vedi su GitHub
 (1 commento) (0 reazioni) (1 assegnatario)TypeScript (10.221 fork)batch import
buggithelp wanted

Metriche repository

Star
 (74.848 star)
Metriche merge PR
 (Merge medio 11h 43m) (1000 PR mergiate in 30 g)

Descrizione

Description

When Git/SSH outputs the informational message warning: permanently added 'gitlab.com' to the list of known hosts, VS Code displays it with error-level styling (red error icon with X), making it appear as a critical error when it's actually just an informational message.

Expected Behavior

Informational Git/SSH warnings should be styled as warnings (yellow/orange) or informational messages (blue), not as errors (red).

Actual Behavior

The message is displayed with a red circular error icon containing a white X, which is the same styling used for actual errors. This is misleading because:

  • The message is informational, not an error
  • It's a normal part of SSH's first-time connection process
  • Users may be alarmed by the error styling

Steps to Reproduce

  1. Connect to a Git repository (e.g., GitLab) via SSH for the first time
  2. Observe the warning popup that appears
  3. Notice the red error icon styling despite the message being a warning

Screenshot

See attached screenshot showing the incorrectly styled warning message.

Additional Context

This issue likely stems from VS Code parsing Git output and mapping the "warning" keyword to error-level styling. The message originates from Git/SSH, not VS Code, but VS Code's UI is applying incorrect styling.

Related issue in Cursor: https://github.com/getcursor/cursor/issues/3833

Environment

  • VS Code version: [current version]
  • OS: Windows 11
  • Git version: [current version]

Guida contributor