我git-filter-repo
通过安装scoop
,尝试了多个git filter-repo
命令,例如git filter-repo -h
,它们都没有记录任何内容,没有警告或错误,只是没有记录。
尝试重新启动、重新安装并在另一台 Windows 10 计算机上安装它,全部重现。
git-filter-repo
: v2.33.0
git
: v2.33.0.windows.2
python
: v3.9.7
scoop
:
Current Scoop version:
09200504 (HEAD -> master, origin/master, origin/HEAD) reset: skip when app instance is running (#4359)
'main' bucket:
b71f4a842 (HEAD -> master, origin/master, origin/HEAD) nunit-extension-vs-project-loader: Update to version 3.9.0
Run Code Online (Sandbox Code Playgroud)
如何解决这个问题?
我在 Windows 10 x64 上使用设置,我通过 scoop 安装和管理 git,而不是自己下载和执行安装程序。通过PowerShell,我跑了
scoop install git
scoop install openssh
[environment]::setenvironmentvariable('GIT_SSH', (resolve-path (scoop which ssh)), 'USER')
Run Code Online (Sandbox Code Playgroud)
但是,现在当我尝试运行的命令在Git的Bash的喜欢
git clone git@example.org:vendor/repository.git
Run Code Online (Sandbox Code Playgroud)
或者一个简单的
git push/pull
Run Code Online (Sandbox Code Playgroud)
我只得到
CreateProcessW failed error:193
ssh_askpass: posix_spawn: Unknown error
Run Code Online (Sandbox Code Playgroud)
而不是 Git Bash 询问我的 SSH 密钥密码。
我在许多其他 Windows 10 x64 上使用相同的设置(通过 scoop 安装的 git)并且那里没有出现问题。所以我不确定这个问题出了什么问题。我以前在同一台机器上安装了 git 而不使用 scoop,并且 Git Bash 运行良好。在通过scoop重新安装它之前,我完全卸载了 git(并且还重新启动了机器,只是为了确定)。
如果相关,SSH_ASKPASS
环境变量包含以下内容:
$ echo ${SSH_ASKPASS}
/mingw64/libexec/git-core/git-gui--askpass
Run Code Online (Sandbox Code Playgroud)
不确定那个文件夹指的是什么(大概是Git Bash内部的东西?),因为它在我的机器上显然不存在。
当使用git-with-openssh
而不是单独git
和openssh
单独使用它时。但是,我没有在我的其他机器上使用它,所以我仍然想知道为什么它在这里不起作用。
当尝试使用 scoop via 更新 Powershell Core 时scoop update pwsh
,出现以下错误:
ERROR Application "pwsh" is still running. Close all instances and try again.
我尝试关闭 PowerShell 并更新 via cmd
,但它仍然引发该错误。
每当我通过 Powershell 运行命令行在 Windows 上安装 scoop 时,它只会显示“默认情况下禁用以管理员身份运行安装程序,请参阅https://github.com/ScoopInstaller/Install#for-admin了解详细信息。”
我尝试以管理员身份运行 Powershell 和“-RunAsAdmin”选项,但似乎没有一个对我有用。
我想在 Windows 上尝试Scoop,其文档要求“必须为您的用户帐户启用 PowerShell”,方法是运行
PS > Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Run Code Online (Sandbox Code Playgroud)
当我运行命令时,我看到一条警告:
Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic at
https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"):
Run Code Online (Sandbox Code Playgroud)
应采取哪些措施来减轻这一风险?在安装 Scoot 后以及运行 Scoop …