-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved to PSResource functionality Make it available for MacOS
- Loading branch information
Pascal Haag
committed
May 22, 2024
1 parent
c852594
commit 03692f4
Showing
17 changed files
with
340 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
function Set-GIRepoCredential { | ||
<# | ||
.SYNOPSIS | ||
Creates or sets the repository credential. | ||
.DESCRIPTION | ||
Creates or sets the repository credential for internal repositories. | ||
.PARAMETER RepositoryName | ||
Name of the repository, to link the credentails. | ||
.PARAMETER Credential | ||
Credentials that should be set. | ||
.EXAMPLE | ||
C:\> Set-GIRepoCredential -RepositoryName "Company-Repository" -Credential $cred | ||
Will create or set for the repository "Company-Repository" the credential $cred. | ||
#> | ||
[CmdletBinding()] | ||
param ( | ||
[ArgumentCompleter({ Get-RepoNameCompletion $args })] | ||
[ValidateScript({ Assert-RepoName -Name $_ })] | ||
[Parameter(Mandatory)] | ||
$RepositoryName, | ||
|
||
[Parameter(Mandatory)] | ||
[pscredential] | ||
$Credential | ||
) | ||
process { | ||
$credFile = Join-Path $Script:configPath "$($RepositoryName)_RepoCred.clixml" | ||
$Credential | Export-Clixml -Path $credFile -Force | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.