microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.59k stars 29.03k forks source link

GPG_TTY showing as `not a tty` #156074

Closed samchouse closed 2 years ago

samchouse commented 2 years ago

Type: Bug

  1. Add export GPG_TTY=$(tty) to ~/.zprofile
  2. Open VSCode and run echo $GPG_TTY
    • It returns not a tty but if I manually rexeport it, then it returns a tty

Note: In Windows Terminal opening my WSL terminal and echoing the tty, everything is fine. I also get keyring requests when I open VSCode (every time), maybe that's blocking it? On top of that problem would there be a way to stop having these keychain requests, and only have it when VSCode is opened on the first time on a user session?

VS Code version: Code - Insiders 1.70.0-insider (13ba7bb446a638d37ebccb1a7d74e31c32bb9790, 2022-07-22T05:17:00.353Z) OS version: Windows_NT x64 10.0.22000 Modes: Remote OS version: Linux x64 5.10.102.1-microsoft-standard-WSL2

System Info |Item|Value| |---|---| |CPUs|12th Gen Intel(R) Core(TM) i7-12700F (20 x 2112)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|31.86GB (12.11GB free)| |Process Argv|--crash-reporter-id 941afc64-b57e-4453-a6a8-91166b7881fe| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|WSL: Ubuntu| |OS|Linux x64 5.10.102.1-microsoft-standard-WSL2| |CPUs|12th Gen Intel(R) Core(TM) i7-12700F (20 x 2111)| |Memory (System)|15.55GB (8.33GB free)| |VM|0%|
Extensions (47) Extension|Author (truncated)|Version ---|---|--- better-comments|aar|3.0.0 QML|bbe|1.0.0 systemd-unit-file|coo|1.0.6 postcss|css|1.0.9 auto-rename-tag|for|0.1.10 remotehub|Git|0.38.0 fluent-icons|mig|0.0.17 dotenv|mik|1.0.1 remote-wsl|ms-|0.66.3 vscode-remote-extensionpack|ms-|0.21.0 remote-repositories|ms-|0.16.0 mdx|sil|0.1.0 better-comments|aar|3.0.0 QML|bbe|1.0.0 prettier-toml|bod|0.1.0 tailwindshades|bou|0.0.5 vscode-tailwindcss|bra|0.8.6 better-toml|bun|0.3.2 systemd-unit-file|coo|1.0.6 postcss|css|1.0.9 vscode-markdownlint|Dav|0.47.0 vscode-eslint|dba|2.2.6 gitlens|eam|12.1.2 prettier-vscode|esb|9.5.0 auto-rename-tag|for|0.1.10 shell-format|fox|7.2.2 copilot|Git|1.34.6280 go|gol|0.35.1 hcl|has|0.2.1 template-string-converter|meg|0.6.0 fluent-icons|mig|0.0.17 dotenv|mik|1.0.1 vscode-docker|ms-|1.22.1 vsliveshare|ms-|1.0.5641 vsliveshare-audio|ms-|0.1.91 vscode-jest|Ort|4.6.0 prisma|Pri|4.1.0 quicktype|qui|12.0.46 vscode-commons|red|0.0.6 vscode-xml|red|0.21.0 vscode-yaml|red|1.9.1 rust-analyzer|rus|0.3.1131 mdx|sil|0.1.0 addDocComments|ste|0.0.8 code-spell-checker|str|2.3.1 shellcheck|tim|0.19.6 lorem-ipsum|Tyr|1.3.1 (2 theme extensions excluded)
A/B Experiments ``` vsliv695:30137379 vsins829:30139715 vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30422396 pythontb:30258533 pythonvspyt551cf:30291413 pythonptprofiler:30281269 vshan820:30294714 pythondataviewer:30285072 vscod805:30301674 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30404738 wslgetstarted:30449409 vscscmwlcmt:30465136 cppdebug:30492333 pylanb8912:30522163 vsclangdf:30492506 841h4636:30532337 ```
meganrogge commented 2 years ago

Are you using a login shell? What are your terminal settings (specifically terminal profiles)?

meganrogge commented 2 years ago

Also if you open a second terminal and try it there, does it work?

samchouse commented 2 years ago

I don't have access to the PC with the problem right now, I should have it again in 8-9 days. I'm not sure what you mean by login shel and terminal profiles though.

meganrogge commented 2 years ago

Ok pls post that info and your terminal settings when you have it

vscodenpa commented 2 years ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

samchouse commented 2 years ago

@meganrogge here's the info.

Are you using a login shell? What are your terminal settings (specifically terminal profiles)?

I'm using ZSH as my shell. I'm using the default settings for zsh profile and these are my settings.

{
  "terminal.integrated.fontFamily": "'MonoLisa NF', MonoLisa, 'MesloLGS NF', Hack, Consolas",
  "terminal.integrated.sendKeybindingsToShell": true,
  "terminal.integrated.enableMultiLinePasteWarning": false,
  "terminal.integrated.defaultProfile.linux": "zsh",
}

Also if you open a second terminal and try it there, does it work?

No