diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index cda7ac161..caee0572a 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -568,7 +568,9 @@ git-r3_fetch() {
 	debug-print-function ${FUNCNAME} "$@"
 
 	# disable password prompts, https://bugs.gentoo.org/701276
-	local -x GIT_TERMINAL_PROMPT=0
+	if ! has interactive ${PROPERTIES}; then
+		local -x GIT_TERMINAL_PROMPT=0
+	fi
 
 	# process repos first since we create repo_name from it
 	local repos