无法在psexec模式下从git中提取
当我从本地登录时,一切正常,但当我尝试通过PSEXEC登录到Windows7GitVersion2.28.0.Windows.1,并尝试获取它显示的更改时无法在psexec模式下从git中提取,git,stack-overflow,psexec,Git,Stack Overflow,Psexec,当我从本地登录时,一切正常,但当我尝试通过PSEXEC登录到Windows7GitVersion2.28.0.Windows.1,并尝试获取它显示的更改时 git.exe : + CategoryInfo : NotSpecified: (:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError Process is terminated due to StackOverflowExce
git.exe :
+ CategoryInfo : NotSpecified: (:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Process is terminated due to StackOverflowException.
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No such file or directory
只有当我试图从PSEXEC模式中退出时才会发生这种情况,即使我也是以管理员身份并通过同一本地帐户登录的。该错误可能与:
- 私有存储库(意味着您需要对每个Git远程命令进行身份验证,就像pull一样)
- 凭证助手(检查什么
通过psexec返回)git config credential.helper
git remote set-url origin https://<username>@github.com/<username>/<myrepo>
git远程设置url源https:////github.com//
当同时指定用户名和密码时,注释中的报告将起作用
git remote set-url origin https://<username>:<password>@github.com/<username>/<myrepo>.git
git远程设置url源https://:@github.com//.git
理想情况下,如果在由访问的远程计算机上安装了足够新的版本(及其相关版本)
首先检查远程计算机上Git的安装位置:
psexec <...parameters for remote machine> where git
psexec其中git
然后使用远程凭据帮助器注册密码:
psexec[path\to\git]\mingw64\libexec\git core\git-credential-manager.exe存储
注意:最好使用比实际密码更安全的密码,并且您可以随时撤销PAT,而无需更改密码
git remote set-url origin https://<username>:<password>@github.com/<username>/<myrepo>.git
那么,一个只包含用户名的简单URL就足够了:
git remote set-url origin https://<username>@github.com/<username>/<myrepo>.git
git远程设置url源https://@github.com//.git
问题是一切正常,包括git pull
当我从本地登录时,它只在我通过PSEXEC执行时才会出现此错误。我通过PSEXEC尝试了git-config-credential.helper
,它返回了manager
,远程url已经存在set@SivaManasan您可以尝试使用用户名设置远程URL以进行测试吗?我尝试了并得到错误git.exe:usage:git remote set URL[--push][]+CategoryInfo:NotSpecified:(用法:git remo…url>[]:String)[],RemoteException+FullyQualifiedErrorId:NativeCommandError或:git远程集url--添加或:git远程集url--删除--推送操作推送url--添加添加url--删除URLs@SivaManasan抱歉,我错过了远程名称。我已编辑了答案。我尝试了您的新编辑它说密码丢失了,所以我使用了git-remote-set-url-origin-https://:@github.com//.git
,现在一切都正常了,包括git-pull