error: There was a problem with the editor 'vi' Git Origin: Build & delivery OSI layer 7 · Application Last updated 25 Nov 2026

error: There was a problem with the editor 'vi'. Please supply the message using either -m or -F option.

Git couldn't open your configured editor to collect a message or todo list.

Exact message you may see There was a problem with the editorPlease supply the message using either -m or -F optionerror problem with the editor vierror: There was a problem with the editor 'vi'. Please supply the message using either -m or -F option.
Seen on: Git

Meaning

The editor isn't installed or it's a GUI that exits immediately. Set core.editor (use --wait for VS Code) or pass -m.

Common causes

  • Editor not installed
  • GUI editor without wait flag
  • Non-interactive shell

⚡ Quick fix

  1. git config --global core.editor "code --wait"
  2. Install vim/nano
  3. Provide -m for commit messages

Detailed fix by platform

Git

  1. git config --global core.editor "code --wait"

How to diagnose

  1. Editor — installed?
  2. Flag — --wait?
  3. Shell — interactive?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):

/etc/ssh/sshd_config: line 12: Bad configuration option — /etc/ssh/sshd_config line 12: Bad configuration option: PermitRootLogin yes sshd_config: terminating, 1 bad configuration options (Linux)/etc/ssh/sshd_config:…author identity unknown — Author identity unknown *** Please tell me who you are. (Git)author identity unkno…cherry-pick: The previous cherry-pick is now empty — The previous cherry-pick is now empty, possibly due to conflict resolution. (Git)cherry-pick: The prev…error: could not lock config file .git/config: File exists — error: could not lock config file /home/user/.gitconfig: File exists (Git)error: could not lock…error: key does not contain a section — error: key does not contain a section: user (Git)error: key does not c…error: pathspec 'text' did not match any file(s) known to git (unquoted -m message) — error: pathspec 'fix' did not match any file(s) known to git error: pathspec 'login' did not match any file(s) known to git (Git)error: pathspec 'text…error: unknown option 'x' / unknown switch — error: unknown option `no-edit' usage: git rebase [-i] [options] (Git)error: unknown option…fatal: bad boolean config value 'x' for 'core.autocrlf' — fatal: bad boolean config value 'yes please' for 'core.filemode' (Git)fatal: bad boolean co…error: Th…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.