- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想在笔记本电脑上安装 posh-git,但是当我尝试使用命令“PowerShellGet\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force”安装时出现错误:
Install-Module : A parameter cannot be found that matches parameter name
'AllowPrerelease'.
At line:1 char:58
+ ... et\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Install-Module], Paramet
erBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Install-Module
PackageManagement\Install-Package : The module 'PackageManagement' cannot be
installed or updated because the authenticode signature of the file
'PackageManagement.cat' is not valid.
At C:\Program
Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809
char:21
+ ... $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Power....InstallP
ackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : InvalidAuthenticodeSignature,ValidateAndGet-Au
thenticodeSignature,Microsoft.PowerShell.PackageManagement.Cmdlets.Insta
llPackage
最佳答案
错误是具体的。您正在为模块使用默认情况下不存在的参数/开关。
# get function / cmdlet details
(Get-Command -Name Install-Module).Parameters.Keys
<#
Name
InputObject
MinimumVersion
MaximumVersion
RequiredVersion
Repository
Credential
Scope
Proxy
ProxyCredential
AllowClobber
SkipPublisherCheck
Force
Verbose
Debug
ErrorAction
WarningAction
InformationAction
ErrorVariable
WarningVariable
InformationVariable
OutVariable
OutBuffer
PipelineVariable
WhatIf
Confirm
#>
Get-help -Name Install-Module -Examples
Get-help -Name Install-Module -Full
Get-help -Name Install-Module -Online
Publishers simply add the prerelease string (ie. the part that comes after “2.0.0”) in the metadata, and the version will be considered prerelease. For example:
@{
ModuleVersion = '2.0.0'
#---
PrivateData = @{
PSData = @{
Prerelease = '-alpha'
}
}
}
PowerShellGet\Install-Module
Find-Module -Name posh-git
Version Name Repository Description
------- ---- ---------- -----------
0.7.3 posh-git PSGallery Provides prompt ...
Find-Module -Name posh-git |
Save-Module -Path "$env:USERPROFILE\Documents\WindowsPowerShell\Modules" # -WhatIf
What if: Performing the operation "Save Package" on target "'posh-git' to location 'C:\Users\Daniel\Documents\WindowsPowerShell\Modules'".
Install-Module -Name posh-git -Scope CurrentUser -Force
关于powershell - 安装 posh-git 时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53974626/
您好,我是 Git 和 Hg 的忠实粉丝,在很多项目中都必须同时使用它们。我目前使用 Posh-Hg,这是一个 powershell 插件,可以将当前分支和未完成的提交放在你的 powershell
所以我试着为Windows安装了oh-my-posh。安装模块oh-my-posh -Scope当前用户。并打字。Get-Posh主题。查看我下载的可用主题。但我收到了这条消息。有谁可以帮我?
Windows 终端 - 通过 oh-my-posh/posh-git Set-Theme 错误自定义 PowerShell? 我按照 Microsoft 链接的确切教程进行操作:enter link
我想在 cmder powershell 中使用 git。 错误 Cmder 打印出如下错误: Missing git support, install posh-git with 'Install-
关闭。这个问题是not about programming or software development .它目前不接受答案。 这个问题似乎不是关于 a specific programming
我正在尝试从机器 A 运行 PS Remote session 以访问机器 B。两者都在同一个域中并且 Kerberos 身份验证正在工作,我可以建立一个 PS Remote session 。 我正
我正在从 Web 服务解析 JSON 以获取我的任务(使用 TimeFlip)。现在,我返回每个任务、发生时间和持续时间,因此数据如下所示: (taskname, start, durationinS
我喜欢 posh-git powershell env for git但在某些(非常大的)存储库上,它会明显减慢 ps 提示。 我想知道是否可以在某些特定的存储库上禁用它 最佳答案 为了性能,他们确实
我有一个 CSV 文件,其内容如下: A,B,C D,"E,F",G H,I,"J,K,L" 我需要删除引号之间的逗号(也删除引号,但这并不那么重要): A,B,C D,EF,G H,I,JKL 我看
我有一个旧版本的 posh-git 我想更新(同时尝试解决缓慢的 powershell 启动问题) 我从 repo 中提取了最新的内容,当我尝试执行 .\install.ps1 时,我得到了 It s
考虑以下简单的 shell 脚本: rm -rf bar \"bar\" mkdir -p bar touch bar/baz echo "bar"/* 我用 bash、ksh、zsh 和 dash
我为 Windows PowerShell 安装了 posh-git,它在 shell 中运行良好。但是,它也应该在包管理器控制台中工作。它确实有效,但它不像普通的 powershell 窗口那样显示
我想在笔记本电脑上安装 posh-git,但是当我尝试使用命令“PowerShellGet\Install-Module posh-git -Scope CurrentUser -AllowPrere
一直在尝试使用 posh-ssh 连接到 sftp。当我运行它时工作正常,当我尝试通过 Windows 任务调度程序运行它时它不起作用。 我尝试切换要运行脚本的用户,例如管理员、我自己、系统等。 我曾
在powershell中,如果我进行REST调用并收到任何类型的json响应,则可以轻松地将$json | ConvertFrom-Json转换为适当的对象,以便可以进行修改,呈现特定的值。 似乎在G
我已经为此苦苦挣扎了一天。基本上,我想使用每天在我的 Windows 计算机上运行的 powershell 脚本来备份我们网站空间上的 MySQL 数据库。 当我使用 Putty 并输入以下命令时,会
首先,我在 oh my posh 中使用 hotstick.minimal 主题。它看起来像这样。 如您所见,当前的 venv 看起来不太好。我对 JSON 文件做了一些更改。然后它看起来像这样。 我
我正在尝试将 posh-git 安装到 Visual Studio 包管理器控制台(与 2012 相比),但在 poshgit 目录中运行 .\install.ps1 并重新加载配置文件时出现以下错误
我正在尝试从 Windows 10 上运行的 PowerShell 脚本重启 Linux 机器。我使用 Posh-SSH 模块。我通过 SSH session 发送的所有其他命令工作正常,但无论我尝试
我正在使用 posh-git 将 git 信息添加到我的 PowerShell 提示符中。我想让我的提示包含远程存储库名称,如 the examples但找不到这样做的方法。 下面是我的个人资料和我的
我是一名优秀的程序员,十分优秀!