PowerShell / PowerShell/PowerShell

git pull command hung over ssh

Open
#19,432 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug Needs-Triage WG-Remoting
Dominant language
C#
Stars
55.5k
Forks
8.5k
Avg merge
1d 2h
Merged PRs (30d)
88

Description

Prerequisites
Steps to reproduce

Repro steps:

$session = New-PSSession -HostName xxx.xxx.com -UserName Lin
enter-PSSession -Session $session

$env:GIT_TRACE=2
$env:GIT_SSH_COMMAND="ssh -vvv"
git pull origin main

NOTE, if I ssh into command prompt on remote machine, git works fine. This is why I think maybe the bug is in PowerShell. In other words, the following works fine:

ssh Lin@desktop-n9cin42.amd.com
lin@DESKTOP-N9CIN42 C:\Users\MyGitRepo> git pull origin main
Expected behavior
git commands run successfully
Actual behavior
git pull command hangs
Error details

No response

Environment data
PowerShell versions on Remote machine:

[11 ms] > $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.3.3
PSEdition                      Core
GitCommitId                    7.3.3
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Visuals

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the listed New-PSSession and Enter-PSSession commands on PowerShell 7.3.3 and Windows 10, then compare them with the direct SSH command that succeeds. Investigate the difference in how git pull origin main runs in those sessions; done means the command completes successfully over the PowerShell session instead of hanging.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, powershell
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.