(self, repo_dir: str, git_token: str)
| 89 | # Auth / user config |
| 90 | # ------------------------------------------------------------------ |
| 91 | def config_git_token(self, repo_dir: str, git_token: str) -> None: |
| 92 | url = self.get_repo_remote_url(repo_dir) |
| 93 | if '//oauth2' in url: |
| 94 | return |
| 95 | auth_url = self._add_git_token(git_token, url) |
| 96 | self._run_git_command('-C', repo_dir, 'remote', 'set-url', 'origin', |
| 97 | auth_url) |
| 98 | |
| 99 | def add_user_info(self, repo_base_dir: str, repo_name: str) -> None: |
| 100 | from modelscope.hub.api import ModelScopeConfig |
no test coverage detected