def _get_authenticated_git_url(self, repo_path: str) -> str:
        """Get an authenticated git URL for a repository.

        Args:
            repo_path: Repository path (e.g., "github.com/acme-co/api")

        Returns:
            Authenticated git URL if credentials are available, otherwise regular HTTPS URL
        """
        remote_url = f'https://{repo_path}.git'

        # Determine provider from repo path
        provider = None
        if 'github.com' in repo_path:
            provider = ProviderType.GITHUB
        elif 'gitlab.com' in repo_path:
            provider = ProviderType.GITLAB

        # Add authentication if available
        if (
            provider
            and self.git_provider_tokens
            and provider in self.git_provider_tokens
        ):
            git_token = self.git_provider_tokens[provider].token
            if git_token:
                if provider == ProviderType.GITLAB:
                    remote_url = f'https://oauth2:{git_token.get_secret_value()}@{repo_path.replace("gitlab.com/", "")}.git'
                else:
                    remote_url = f'https://{git_token.get_secret_value()}@{repo_path.replace("github.com/", "")}.git'

        return remote_url
Get an authenticated git URL for a repository.

        Args:
            repo_path: Repository path (e.g., "github.com/acme-co/api")

        Returns:
            Authenticated git URL if credentials are available, otherwise regular HTTPS URL
        
openhands/runtime/base.py