Skip to content

Commit

Permalink
Remove the unsuported password authentication
Browse files Browse the repository at this point in the history
GitHub removed the support for password authentication
November 13, 2020 at 16:00 UTC in favor of the personal
access token. This commit removes all password references
from this project.

https://developer.github.com/changes/2020-02-14-deprecating-password-auth/
  • Loading branch information
countzero committed May 11, 2021
1 parent 79fbe42 commit c35574d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Open a PowerShell console at the location of the unpacked release and execute th
### Backup all git repositories of a user
Execute the following to backup all git repositories of a GitHub user into the subdirectory `./YYYY-MM-DD/`.
```PowerShell
.\backup_github_repositories.ps1 -userName "user" -userSecret "password"
.\backup_github_repositories.ps1 -userName "user" -userSecret "token"
```

### Backup all git repositores of a organisation
Execute the following to backup all git repositories of a GitHub organisation into the subdirectory `./YYYY-MM-DD/`.
```PowerShell
.\backup_github_repositories.ps1 -userName "user" -userSecret "password" -organisationName "organisation"
.\backup_github_repositories.ps1 -userName "user" -userSecret "token" -organisationName "organisation"
```

### Backup all git repositories of a user into a specific directory
Expand Down
12 changes: 6 additions & 6 deletions backup_github_repositories.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This script automatically backups all remote GitHub repositories of a user or an
Specifies the GitHub user name.
.PARAMETER userSecret
Specifies the password or personal access token of the GitHub user.
Specifies the personal access token of the GitHub user.
.PARAMETER organisationName
Specifies the optional GitHub organisation name.
Expand All @@ -23,10 +23,10 @@ Overrides the default backup directory.
Overrides the default concurrency of 8.
.EXAMPLE
.\backup_github_repositories.ps1 -userName "user" -userSecret "secret"
.\backup_github_repositories.ps1 -userName "user" -userSecret "token"
.EXAMPLE
.\backup_github_repositories.ps1 -userName "user" -userSecret "secret" -organisationName "organisation"
.\backup_github_repositories.ps1 -userName "user" -userSecret "token" -organisationName "organisation"
.EXAMPLE
.\backup_github_repositories.ps1 -backupDirectory "C:\myBackupDirectory" -maxConcurrency 1
Expand All @@ -46,10 +46,10 @@ Param (

[Parameter(
Mandatory=$True,
HelpMessage="The password or personal access token of the GitHub user.",
HelpMessage="The personal access token of the GitHub user.",
ParameterSetName = 'SecureSecret'
)]
[Security.SecureString]${user password or personal access token},
[Security.SecureString]${personal access token},
[Parameter(
Mandatory = $True,
ParameterSetName = 'PlainTextSecret'
Expand All @@ -72,7 +72,7 @@ Param (
if ($userSecret) {
$secureStringUserSecret = $userSecret | ConvertTo-SecureString -AsPlainText -Force
} else {
$secureStringUserSecret = ${user password or personal access token}
$secureStringUserSecret = ${personal access token}
}

# Convert the secure user secret string into a plain text representation.
Expand Down

0 comments on commit c35574d

Please sign in to comment.