Interface UrlArtifactRepository
- All Known Subinterfaces:
IvyArtifactRepository, MavenArtifactRepository
- Since:
- 6.0
-
Method Summary
Modifier and TypeMethodDescriptionSpecifies whether to continue checking other repositories if this repository is disabled due to connection or communication errors.getUrl()The base URL of this repository.booleanSpecifies whether it is acceptable to communicate with a repository over an insecure HTTP connection.voidsetAllowInsecureProtocol(boolean allowInsecureProtocol) Specifies whether it is acceptable to communicate with a repository over an insecure HTTP connection, or with an SFTP server whose host key cannot be verified.voidSets the base URL of this repository.voidSets the base URL of this repository.
-
Method Details
-
getUrl
-
setUrl
Sets the base URL of this repository.- Parameters:
url- The base URL.- Since:
- 6.0
-
setUrl
Sets the base URL of this repository.- Parameters:
url- The base URL.- Since:
- 6.0
-
isAllowInsecureProtocol
boolean isAllowInsecureProtocol()Specifies whether it is acceptable to communicate with a repository over an insecure HTTP connection.For an SFTP repository, specifies whether it is acceptable to communicate with a server whose host key is not listed, or does not match the key listed, in
~/.ssh/known_hostsor/etc/ssh/ssh_known_hosts(%ProgramData%\ssh\ssh_known_hostson Windows).For security purposes this intentionally requires a user to opt-in to using insecure protocols on case by case basis.
Gradle intentionally does not offer a global system/gradle property that allows a universal disable of this check.
Allowing communication over insecure protocols allows for a man-in-the-middle to impersonate the intended server, and gives an attacker the ability to serve malicious executable code onto the system.
See also: Want to take over the Java ecosystem? All you need is a MITM!
- Since:
- 6.0
-
setAllowInsecureProtocol
void setAllowInsecureProtocol(boolean allowInsecureProtocol) Specifies whether it is acceptable to communicate with a repository over an insecure HTTP connection, or with an SFTP server whose host key cannot be verified.- Since:
- 6.0
- See Also:
-
getAllowInsecureContinueWhenDisabled
Specifies whether to continue checking other repositories if this repository is disabled due to connection or communication errors.The conventional value for this property is
false, which means to not continue to check other repositories after this one.- Returns:
- a property that control the behavior to continue or not
- Since:
- 9.3.0
- See Also:
-