@@ -162,7 +162,8 @@ const hasRemote = async () => {
162162} ;
163163
164164const hasUnfetchedChangesFromRemote = async ( ) => {
165- const { stdout : possibleNewChanges } = await execa ( 'git' , [ 'fetch' , '--dry-run' ] , { timeout : gitNetworkTimeout } ) ;
165+ // Inherit stdin to allow SSH password prompts for password-protected keys
166+ const { stdout : possibleNewChanges } = await execa ( 'git' , [ 'fetch' , '--dry-run' ] , { stdin : 'inherit' , timeout : gitNetworkTimeout } ) ;
166167
167168 // There are unfetched changes if output is not empty.
168169 return Boolean ( possibleNewChanges ) ;
@@ -191,14 +192,16 @@ export const verifyRemoteHistoryIsClean = async () => {
191192
192193export const verifyRemoteIsValid = async ( ) => {
193194 try {
194- await execa ( 'git' , [ 'ls-remote' , 'origin' , 'HEAD' ] , { timeout : gitNetworkTimeout } ) ;
195+ // Inherit stdin to allow SSH password prompts for password-protected keys
196+ await execa ( 'git' , [ 'ls-remote' , 'origin' , 'HEAD' ] , { stdin : 'inherit' , timeout : gitNetworkTimeout } ) ;
195197 } catch ( error ) {
196198 throw new Error ( error . stderr . replace ( 'fatal:' , 'Git fatal error:' ) ) ;
197199 }
198200} ;
199201
200202export const fetch = async ( ) => {
201- await execa ( 'git' , [ 'fetch' ] , { timeout : gitNetworkTimeout } ) ;
203+ // Inherit stdin to allow SSH password prompts for password-protected keys
204+ await execa ( 'git' , [ 'fetch' ] , { stdin : 'inherit' , timeout : gitNetworkTimeout } ) ;
202205} ;
203206
204207const hasLocalBranch = async branch => {
@@ -253,7 +256,8 @@ export const commitLogFromRevision = async revision => {
253256} ;
254257
255258const push = async ( tagArgument = '--follow-tags' ) => {
256- await execa ( 'git' , [ 'push' , tagArgument ] , { timeout : gitNetworkTimeout } ) ;
259+ // Inherit stdin to allow SSH password prompts for password-protected keys
260+ await execa ( 'git' , [ 'push' , tagArgument ] , { stdin : 'inherit' , timeout : gitNetworkTimeout } ) ;
257261} ;
258262
259263export const pushGraceful = async remoteIsOnGitHub => {
0 commit comments