简体   繁体   English

如何使用 PowerShell 从 github 中的特定仓库获取文件列表?

[英]How to get the list of files from particular repo in github using PowerShell?

Something similar to this - How to get list of files from a specific GitHub repo(Link) in c# , but using PowerShell.与此类似的东西 - 如何从 c# 中的特定 GitHub repo(Link) 获取文件列表,但使用 PowerShell。

Microsoft already provides cmdlets for github use cases. Microsoft 已经为 github 用例提供了 cmdlet。

PowerShellForGitHub PowerShellForGitHub

https://github.com/Microsoft/PowerShellForGitHub https://github.com/Microsoft/PowerShellForGitHub

Even the link you post gave you an answer:甚至您发布的链接也给了您答案:

curl https://api.github.com/repos/crs2007/ActiveReport/contents/ActiveReport

curl is an alias in PowerShell curl 是 PowerShell 中的别名

Get-Alias -Name curl
# Results
<#
 Get-Alias -Name curl

CommandType     Name                       Version    Source                                                                                              
-----------     ----                       -------    ------                                                                                              
Alias           curl -> Invoke-WebRequest 
#>

# Get specifics for a module, cmdlet, or function
(Get-Command -Name Invoke-WebRequest ).Parameters
(Get-Command -Name Invoke-WebRequest ).Parameters.Keys
Get-help -Name Invoke-WebRequest  -Examples
Get-help -Name Invoke-WebRequest  -Full
Get-help -Name Invoke-WebRequest  -Online

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 powershell 脚本创建 github 存储库 - How to create github repo using powershell script 如何从Powershell中的对象列表中获取特定字段的列表 - How to get a list of a particular field from a list of objects in powershell 如何使用 powershell 从 JSON 中获取特定值 - How to get particular values from JSON using powershell Powershell 列出特定所有者的文件 - Powershell list files by particular owner 使用Powershell从人工仓库下载多个文件 - Download multiple files from the artifactory repo using powershell 使用Powershell获取使用特定远程应用程序的用户会话列表 - Get list of user sessions using a particular remote app using powershell 如何使用Powershell获取具有特定数据存储使用空间25%以上的vmware vm列表? - How to get vmware vm list which has more than 25% of used space of the particular datastore using powershell? 如何使用azure powershell命令获取特定azure资源组中存在的azure逻辑应用程序的列表 - how to get the list of azure logic apps present in a particular azure resource group using azure powershell commands 使用Powershell从特定目录中删除文件的代码 - Code to remove the files from a particular directory using powershell 使用 CMD 或 Powershell 从以特定名称开头的文件夹中复制文件 - Copy Files from Folders That Start with a Particular Name Using CMD or Powershell
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM