code: private ProxyCreationResult createRepo( String trackingId, URL url, String name )
                      throws IndyDataException
      {
          UrlInfo info = new UrlInfo( url.toExternalForm() );
  
          UserPass up = UserPass.parse( ApplicationHeader.authorization, httpRequest, url.getAuthority() );
          String baseUrl = getBaseUrl( url, false );
  
          logger.debug( ">>>> Create repo: trackingId=" + trackingId + ", name=" + name );
          ProxyCreationResult result = repoCreator.create( trackingId, name, baseUrl, info, up,
                                                           LoggerFactory.getLogger( repoCreator.getClass() ) );
          ChangeSummary changeSummary =
                          new ChangeSummary( ChangeSummary.SYSTEM_USER, "Creating HTTProx proxy for: " + info.getUrl() );
  
          RemoteRepository remote = result.getRemote();
          if ( remote != null )
          {
              storeManager.storeArtifactStore( remote, changeSummary, false, true, new EventMetadata() );
          }
  
          HostedRepository hosted = result.getHosted();
          if ( hosted != null )
          {
              storeManager.storeArtifactStore( hosted, changeSummary, false, true, new EventMetadata() );
          }
  
          Group group = result.getGroup();
          if ( group != null )
          {
              storeManager.storeArtifactStore( group, changeSummary, false, true, new EventMetadata() );
          }
  
          return result;
      }
docs: Create repositories (group, remote, hosted) when trackingId is present. Otherwise create normal remote
  repository with specified name.
  
  @param trackingId
  @param url
  @param name distinct remote repository name. null if trackingId is given