Microsoft/vscode

Git Warning Message Incorrectly Styled as Error

Open

#280,834 opened on Dec 3, 2025

View on GitHub
 (1 comment) (0 reactions) (1 assignee)TypeScript (10,221 forks)batch import
buggithelp wanted

Repository metrics

Stars
 (74,848 stars)
PR merge metrics
 (Avg merge 11h 48m) (1,000 merged PRs in 30d)

Description

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]

Contributor guide