CodeAnalysis icon indicating copy to clipboard operation
CodeAnalysis copied to clipboard

代码仓扫描时,提示鉴权失败

Open lincoohe opened this issue 2 years ago • 5 comments

server/projects/scmproxy/logs/scmproxy.log 日志信息:

2022-05-16 17:37:14,791 PID:19347 apis.py-line:103 | INFO - method: latest_revision, scm_url: ssh://账户信息@代码仓域名地址及端口/xxxx01/xxxx02/xxxx03/xxxx04代码仓分支#xxxx, scm_type: ssh+git, username: None 2022-05-16 17:37:14,791 PID:19347 apis.py-line:62 | INFO - start to checkout or update: /data/CodeAnalysis/server/projects/scmproxy/sourcedirs/xxxxxxxxxxxxxxxxxxxxxx 2022-05-16 17:37:15,066 PID:19347 proxyserver.py-line:79 | ERROR - Error info: Traceback (most recent call last): File "proxyserver.py", line 74, in _dispatch response = func(*params) File "/data/CodeAnalysis/server/projects/scmproxy/apis.py", line 108, in wrapper coding_project_id=scm_info.get("coding_project_id")) File "/data/CodeAnalysis/server/projects/scmproxy/apis.py", line 89, in __get_client_by_scm_type self.__checkout_sourdir(scm_client, source_dir) File "/data/CodeAnalysis/server/projects/scmproxy/apis.py", line 72, in __checkout_sourdir scm_client.checkout(enable_submodules=False) File "src/_cmdgit.py", line 1585, in src._cmdgit.CmdGit.checkout File "src/_cmdgit.py", line 1426, in src._cmdgit.CmdGit._clone File "src/_cmdgit.py", line 224, in src._cmdgit.CmdGit._cmd_error_check lib._scmbase.ScmCommandError: fatal: Could not read from remote repository. 2022-05-16 17:37:15,067 PID:19347 utils.py-line:51 | INFO - handle git err msg: fatal: Could not read from remote repository. 2022-05-16 17:37:15,067 PID:19347 proxyserver.py-line:82 | ERROR - {method: latest_revision, error_message: fatal: Could not read from remote repository.}

lincoohe avatar May 16 '22 09:05 lincoohe

在当前部署server的机器上能否手动clone这个代码库呢?

Lingghh avatar May 16 '22 09:05 Lingghh

在服务器的指定目录配置了git账号,然后git clone ok的

lincoohe avatar May 16 '22 09:05 lincoohe

该代码仓库是否包含子模块呢?

当前配置的代码仓只是一个master分支。

lincoohe avatar May 16 '22 09:05 lincoohe

在服务器的指定目录配置了git账号,然后git clone ok的

这里可以检查一下 ssh://账户信息@代码仓域名地址及端口/xxxx01/xxxx02/xxxx03/xxxx04代码仓分支#xxxx 这一个地址是否漏了端口号

Lingghh avatar May 16 '22 09:05 Lingghh

或者这里可以先临时用账号密码登记一下试试

Lingghh avatar May 16 '22 09:05 Lingghh