Page MenuHome GnuPG

Trapped at "Your decision?" in an infinite loop on providing unwanted input
Closed, InvalidPublic

Description

While changing the trust levels via the gpg command on Linux, it seems to be stuck at the "Your decision? " input forever. For example, have a look at the following command I/O:

rohan@Genesis:~$ gpg --edit-key rohanbari4@gmail.com 
gpg (GnuPG) 2.2.27; Copyright (C) 2021 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Secret key is available.

sec  rsa3072/xxxxxxxxxxxxxxxxxxxxxxxx
     created: 2021-07-10  expires: never       usage: SC  
     trust: ultimate      validity: ultimate
ssb  rsa3072/xxxxxxxxxxxxxxxxxxxxxxxx
     created: 2021-07-10  expires: never       usage: E   
[ultimate] (1). Rohan Bari (Rohan Bari's official GPG key.) <rohanbari4@gmail.com>

gpg> trust
sec  rsa3072/xxxxxxxxxxxxxxxxxxxxxxxx
     created: 2021-07-10  expires: never       usage: SC  
     trust: ultimate      validity: ultimate
ssb  rsa3072/xxxxxxxxxxxxxxxxxxxxxxxx
     created: 2021-07-10  expires: never       usage: E   
[ultimate] (1). Rohan Bari (Rohan Bari's official GPG key.) <rohanbari4@gmail.com>

Please decide how far you trust this user to correctly verify other users' keys
(by looking at passports, checking fingerprints from different sources, etc.)

  1 = I don't know or won't say
  2 = I do NOT trust
  3 = I trust marginally
  4 = I trust fully
  5 = I trust ultimately
  m = back to the main menu

Your decision? 5
Do you really want to set this key to ultimate trust? (y/N) save
Your decision? y
Your decision? n
Your decision? y
Your decision? N
Your decision? Y
Your decision? exit
Your decision? quit
Your decision? bye
Your decision?
[... and it continues forever until Ctrl+C]

I figured out that it happens on the Windows version of GPG also.

Details

Version
2.2.27

Event Timeline

The interaction goes back to "Your decision?" after you didn't answer "y/N" to the question of "Do you really...?".
What you are asked is: 1, 2, 3, 4, 5 or m.

werner edited projects, added Support; removed Bug Report.

The interaction goes back to "Your decision?" after you didn't answer "y/N" to the question of "Do you really...?".
What you are asked is: 1, 2, 3, 4, 5 or m.

You appear to be correct. It felt like a bug as it didn't explain the reason for repetition (ex. invalid input.)
It kept asking until I entered one of the valid inputs (1..5, or m.)