See PowerShell Gallery for more information.
Windows | Linux | macOS |
---|---|---|
Run the following command in an elevated PowerShell session to install the module from the PowerShell Gallery.
Install-Module Atlassian.Bitbucket
If you already have the module installed, run the following command in an elevated PowerShell session to update the module from the PowerShell Gallery to the latest version.
Update-Module Atlassian.Bitbucket
The module provides session level authentication with optional machine / user encrypted persistance between sessions.
The module supports both Basic authentication and OAuth 2.0 for the Bitbucket API's.
Login-Bitbucket
For OAuth 2.0 Login you will need two sets of credentials.
- Your Atlassian credentials:
email
andpassword
- Key and Secret for OAuth Consumer.
$Cred = Get-Credential -UserName '<Email>'
$OAuth = Get-Credential -UserName '<OAuth Consumer Key>'
Login-Bitbucket -AtlassianCredential $Cred -OAuthConsumer $OAuth
Use Login-Bitbucket -Save
when logging in or Save-BitbucketLogin
at any time to save the information to an encrypted file that will be automatically loaded when you start a new session.
The module will automatically select your team if you have 1 when logging in or prompt you to choose from a list of teams. Cmdlets will default to the team selected unless specified. If you wish to change the team run Select-BitbucketTeam
. If you want to save the change run Save-BitbucketLogin
again.
To get more information on each cmdlet run Get-Help <CMDLET Name>
Get-BitbucketLogin
Get-BitbucketSelectedTeam
Get-BitbucketTeam
New-BitbucketLogin
Remove-BitbucketLogin
Save-BitbucketLogin
Select-BitbucketTeam
Start-BitbucketPipeline
Wait-BitbucketPipeline
Get-BitbucketProject
Get-BitbucketPullRequest
Get-BitbucketPullRequestComment
New-BitbucketPullRequest
New-BitbucketPullRequestComment
Add-BitbucketRepositoryReviewer
Get-BitbucketRepository
Get-BitbucketRepositoryEnvironment
Get-BitbucketRepositoryDeployment
Get-BitbucketRepositoryReviewer
New-BitbucketRepository
New-BitbucketRepositoryEnvironment
Remove-BitbucketRepository
Remove-BitbucketRepositoryEnvironment
Remove-BitbucketRepositoryReviewer
Set-BitbucketRepository
Set-BitbucketRepositoryReviewer
The following CMDLETs are provided but use internal Bitbucket APIs. These CMDLETs would not be possible without accessing the internal APIs, but are much more likely to break if Atlassian changes their internal API. To use these CMDLETs you must also use OAuth 2.0 when logging in.
Get-BitbucketRepositoryEnvironmentVariable
New-BitbucketRepositoryEnvironmentVariable
Remove-BitbucketRepositoryEnvironmentVariable
See CHANGELOG for more information.
See CONTRIBUTING for more information.
See LICENSE for more information.