Class GitUtil
- java.lang.Object
-
- org.apache.maven.scm.provider.git.util.GitUtil
-
public class GitUtil extends Object
- Author:
- Emmanuel Venisse
-
-
Field Summary
Fields Modifier and Type Field Description static File
DEFAULT_SETTINGS_DIRECTORY
protected static String
GIT_SETTINGS_FILENAME
static String
PASSWORD_PLACE_HOLDER_WITH_DELIMITERS
The password placeholder must contain delimiters.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Settings
getSettings()
static File
getSettingsFile()
static String
maskPasswordInUrl(String urlWithCredentials)
Provides an anonymous output to mask password.static Settings
readSettings()
static void
setSettingsDirectory(File directory)
-
-
-
Field Detail
-
GIT_SETTINGS_FILENAME
protected static final String GIT_SETTINGS_FILENAME
- See Also:
- Constant Field Values
-
DEFAULT_SETTINGS_DIRECTORY
public static final File DEFAULT_SETTINGS_DIRECTORY
-
PASSWORD_PLACE_HOLDER_WITH_DELIMITERS
public static final String PASSWORD_PLACE_HOLDER_WITH_DELIMITERS
The password placeholder must contain delimiters. Otherwise replacing may replace other portions of the URL as well and in worst case passwords could be guessed.- See Also:
- Constant Field Values
-
-
Method Detail
-
getSettings
public static Settings getSettings()
-
readSettings
public static Settings readSettings()
-
setSettingsDirectory
public static void setSettingsDirectory(File directory)
-
getSettingsFile
public static File getSettingsFile()
-
maskPasswordInUrl
public static String maskPasswordInUrl(String urlWithCredentials)
Provides an anonymous output to mask password. Considering URL of type : <<protocol>>://<<user>>:<<password>>@ <<host_definition>>- Parameters:
urlWithCredentials
-- Returns:
- urlWithCredentials but password masked with stars
-
-