public static Commandline createCommandLine( GitScmProviderRepository repository ) { Commandline cl = GitCommandLineUtils.getBaseGitCommandLine( null, "ls-remote" ); cl.setWorkingDirectory( System.getProperty( "java.io.tmpdir" ) ); String remoteUrl = repository.getPushUrl(); cl.createArg().setValue( remoteUrl ); return cl; }
public static Commandline createCommandLine( GitScmProviderRepository repository ) { Commandline cl = GitCommandLineUtils.getBaseGitCommandLine( null, "ls-remote" ); cl.setWorkingDirectory( System.getProperty( "java.io.tmpdir" ) ); String remoteUrl = repository.getPushUrl(); cl.createArg().setValue( remoteUrl ); return cl; }
/** * Create the documentation to provide an developer access with a <code>Git</code> SCM. For example, generate * the following command line: * <p> * git clone repo * </p> * * @param gitRepo */ private void developerAccessGit( GitScmProviderRepository gitRepo ) { sink.paragraph(); linkPatternedText( getI18nString( "devaccess.git.intro" ) ); sink.paragraph_(); gitClone( gitRepo.getPushUrl() ); }
config.setString( "remote", "origin", "pushURL", repository.getPushUrl() ); logger.info( "push url: " + repository.getPushUrl().replace( password, "******" ) ); return getCredentials( repository );
config.setString( "remote", "origin", "pushURL", repository.getPushUrl() ); logger.info( "push url: " + repository.getPushUrl().replace( password, "******" ) ); return getCredentials( repository );
/** * Create the documentation to provide an developer access with a * <code>Git</code> SCM. For example, generate the following command line: * <p> * git clone repo * </p> * * @param gitRepo */ private void developerAccessGit(GitScmProviderRepository gitRepo) { sink.paragraph(); linkPatternedText(getI18nString("devaccess.git.intro")); sink.paragraph_(); gitClone(gitRepo.getPushUrl()); }
public static Commandline createPushCommandLine( GitScmProviderRepository repository, ScmFileSet fileSet, String branch ) throws ScmException { Commandline cl = GitCommandLineUtils.getBaseGitCommandLine( fileSet.getBasedir(), "push" ); cl.createArg().setValue( repository.getPushUrl() ); cl.createArg().setValue( "refs/heads/" + branch ); return cl; }
public static Commandline createPushCommandLine( ScmLogger logger, GitScmProviderRepository repository, ScmFileSet fileSet, ScmVersion version ) throws ScmException { Commandline cl = GitCommandLineUtils.getBaseGitCommandLine( fileSet.getBasedir(), "push" ); String branch = GitBranchCommand.getCurrentBranch( logger, repository, fileSet ); if ( branch == null || branch.length() == 0 ) { throw new ScmException( "Could not detect the current branch. Don't know where I should push to!" ); } cl.createArg().setValue( repository.getPushUrl() ); cl.createArg().setValue( "refs/heads/" + branch + ":" + "refs/heads/" + branch ); return cl; }
public static Commandline createPushCommandLine( GitScmProviderRepository repository, ScmFileSet fileSet, String tag ) throws ScmException { Commandline cl = GitCommandLineUtils.getBaseGitCommandLine( fileSet.getBasedir(), "push" ); cl.createArg().setValue( repository.getPushUrl() ); cl.createArg().setValue( "refs/tags/" + tag ); return cl; }
public static Commandline createPushCommandLine( GitScmProviderRepository repository, ScmFileSet fileSet, String branch ) throws ScmException { Commandline cl = GitCommandLineUtils.getBaseGitCommandLine( fileSet.getBasedir(), "push" ); cl.createArg().setValue( repository.getPushUrl() ); cl.createArg().setValue( "refs/heads/" + branch ); return cl; }
public static Commandline createPushCommandLine( GitScmProviderRepository repository, ScmFileSet fileSet, String tag ) throws ScmException { Commandline cl = GitCommandLineUtils.getBaseGitCommandLine( fileSet.getBasedir(), "push" ); cl.createArg().setValue( repository.getPushUrl() ); cl.createArg().setValue( "refs/tags/" + tag ); return cl; }
public static Commandline createPushCommandLine( ScmLogger logger, GitScmProviderRepository repository, ScmFileSet fileSet, ScmVersion version ) throws ScmException { Commandline cl = GitCommandLineUtils.getBaseGitCommandLine( fileSet.getBasedir(), "push" ); String branch = GitBranchCommand.getCurrentBranch( logger, repository, fileSet ); if ( branch == null || branch.length() == 0 ) { throw new ScmException( "Could not detect the current branch. Don't know where I should push to!" ); } cl.createArg().setValue( repository.getPushUrl() ); cl.createArg().setValue( "refs/heads/" + branch + ":" + "refs/heads/" + branch ); return cl; }
public static Commandline createPushCommandLine( GitScmProviderRepository repository, ScmFileSet fileSet, String tag ) { Commandline cl = GitCommandLineUtils.getBaseGitCommandLine( fileSet.getBasedir(), "push" ); cl.createArg().setValue( "--delete" ); cl.createArg().setValue( repository.getPushUrl() ); cl.createArg().setValue( "refs/tags/" + tag ); return cl; }
git.lsRemote().setRemote( repo.getPushUrl() ).setCredentialsProvider( credentials );
git.lsRemote().setRemote( repo.getPushUrl() ).setCredentialsProvider( credentials ) .setTransportConfigCallback(new JGitTransportConfigCallback(repo, getLogger()));