Class BuildStrategyCredentialsProperty
- All Implemented Interfaces:
ExtensionPoint, Describable<com.cloudbees.hudson.plugins.folder.AbstractFolderProperty<?>>, ReconfigurableDescribable<com.cloudbees.hudson.plugins.folder.AbstractFolderProperty<?>>
The strategies always talk Git, not REST. When the SCM source credential is a REST-only API token (for example an Atlassian API scoped token with an email username), Git HTTPS auth fails. Setting this property lets the strategies use a separate, Git-compatible credential without changing the credential used for branch discovery.
The property is only read from the multibranch project itself; it is never inherited from enclosing folders.
The credential is only sent when every remote of the branch's SCM is on one of the configured
hosts, so changing the project's repository URL to another host cannot redirect the
credential there. Several hosts can be listed for providers that use separate hosts for HTTPS and SSH, for example
bitbucket.org and ssh.bitbucket.org.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class com.cloudbees.hudson.plugins.folder.AbstractFolderProperty
owner -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.cloudbees.hudson.plugins.folder.AbstractFolderProperty
getDescriptor, getHealthMetrics, getHealthReports, getItemContainerOverrides, getOwner, reconfigure, reconfigure, setOwner
-
Constructor Details
-
BuildStrategyCredentialsProperty
-
-
Method Details
-
getCredentialsId
- Returns:
- the credential ID, or
nullwhen blank (including blank values loaded fromconfig.xml)
-
getHosts
- Returns:
- the Git hosts the credential may be sent to, lower-cased and comma-separated, or
nullwhen blank
-