Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warp wont start ith ssh-agent prompot in .bashrc #5756

Open
1 task done
OIITCONZ opened this issue Jan 29, 2025 · 6 comments
Open
1 task done

Warp wont start ith ssh-agent prompot in .bashrc #5756

OIITCONZ opened this issue Jan 29, 2025 · 6 comments
Labels
Bugs Bugs, Hangs, Crash, and Freezes

Comments

@OIITCONZ
Copy link

Dupe Check

Describe the bug

Warp hangs saying it is taking a long time to start . Stuck on starting bash

This is because my .bashrc contains lines to start ssh-agent with a keyfile and is asking for the keyfile password.

If I type Control Minus ( Ctrl -) the prompt appears as Warp had dropped to the command line.

Many of us use ssh-agent as we are using git or ssh many times a day and rather than type the same password 50 times or more .... get the agent to load the key.

To reproduce

1 - Add the following to .bashrc

# Add SSH Agent key for for session
eval "$(ssh-agent -s)" > /dev/null
ssh-add ~/.ssh/id_rsa > /dev/null 2>&1

2 - Start Warp.

Expected behavior

Prompt for password

Screenshots

No response

Operating system

Linux

Operating system and version

Linux Mint 22

Shell Version

GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)

Current Warp version

v0.2025.01.22.08.02.stable_05

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

never?

Additional context

No response

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

Is this an issue only in Warp?

Yes, I confirmed that this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

@OIITCONZ OIITCONZ added the Bugs Bugs, Hangs, Crash, and Freezes label Jan 29, 2025
@vorporeal
Copy link

Hey @OIITCONZ - thanks for the report. Mind sharing a pair of screenshots of what Warp looks like in this state, before and after you hit Ctrl minus?

@OIITCONZ
Copy link
Author

Here are the screen shots.

On startup
Image

After 20 seconds ish
Image

After Control -
Image

I've noticed there is a scroll bar appears to the right at times, scrolling that up and the prompt for a passphrase appears - so its possible the prompt is hidden under the warning (image two) or it is scrolled up the screen on start (image one) I've tried resizing my application screen, shutting it down, and restarting but same issue. The prompt is up under the top of the screen .
I'm running bog standard 1920 x 1080 screen resolution.

HTH

@vorporeal
Copy link

Incredibly helpful! We'll take a look.

@vorporeal
Copy link

One more question for right now - do you have a clear in your bashrc somewhere before the ssh-add?

@OIITCONZ
Copy link
Author

Why yes I do :)

Here's the altered parts of bashrc

if true; then # [ "$TERM" = "linux" ]; then
  /bin/echo -e "
  \e]P0000000
  \e]P1ff0000
  \e]P233ff00
  \e]P3ff0099
  \e]P40066ff
  \e]P5cc00ff
  \e]P600ffff
  \e]P7d0d0d0
  \e]P8808080
  \e]P9ff0000
  \e]PA33ff00
  \e]PBff0099
  \e]PC0066ff
  \e]PDcc00ff
  \e]PE00ffff
  \e]PFffffff
  "
  # get rid of artifacts
  clear
fi


#change background when remoting to another terminal via ssh

ssh() {
    # Set the background color
    echo -e "\e[104;93m"

    # Perform SSH
    command ssh "$@"
     # Reset the terminal color after disconnecting
    echo -e "\033]11;#000000\007" # Replace #000000 with your preferred default color
}

# Add SSH Agent key for for session
eval "$(ssh-agent -s)" > /dev/null
ssh-add ~/.ssh/id_rsa > /dev/null 2>&1

# Start KeePassXC
pgrep keepassxc || ~/keepass-start.sh

@OIITCONZ
Copy link
Author

@vorporeal
Here is a wrinkle in that idea:

I removed clear from the script. Warp started and hung as per the issue above. BUT it didn't have a scroll bar to the right. Clicking on the , 'its taking a while' prompt didn't show the prompt or scroll bar. Control - also didn't show the prompt or a scroll bar.

Adding the clear back in gave me a scroll bar and ability to see the prompt when clicking Control -

so the clear actually saved me in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugs Bugs, Hangs, Crash, and Freezes
Projects
None yet
Development

No branches or pull requests

2 participants