Gitea:推送和拉取未经授权

3
Gitea通过Kubernetes集群上的helm chart进行设置。如Gitea - SSH Auth ok but can't push to remote,SSH认证对于git用户可用。HTTPS连接也可用。但是,当我尝试通过SSH推送或拉取时,我会收到以下错误提示:
Gitea: Unauthorized
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我完全不知道该怎么办...

1个回答

1
如果您在使用命令ssh -Tv git@your.Gitea时看到"Hi there, You've successfully authenticated, but Gitea does not provide shell access.",这意味着您实际上没有"正确的访问权限"。
或者是您在仓库URL中犯了一个小错误(大小写或错别字)。这将解决错误消息的第二部分("the repository [does not] exists")。
"

OP xeruf评论中指向metallb-gitea.yaml

"
# https://metallb.org/usage/
#apiVersion: metallb.io/v1beta1
apiVersion: v1
kind: Service
metadata:
  name: gitea-ssh
  namespace: stackspout
  annotations:
    metallb.universe.tf/allow-shared-ip: "share-ipv4"
spec:
  type: LoadBalancer
  loadBalancerIP: "${ip_address}"
  ports:
    - name: ssh
      protocol: TCP
      port: 22
      targetPort: 22
  selector:
    app: gitea

是的,这就是我得到的。我的账户中有一个ssh密钥,并且我已经双重检查了仓库名称 :/ - xeruf
@xeruf 这是一个本地的 Gitea 实例吗?管理员可以检查一下日志吗? - VonC
即使将log.LEVEL设置为trace:/, - xeruf
@xeruf 这是否与 https://open.greenhost.net/stackspin/stackspin/-/issues/1310 有关?因为1364刚刚关闭了。 - VonC
终于搞定了,参见 https://open.greenhost.net/xeruf/stackspout/-/blob/main/basic/apps/code/metallb-gitea.yaml :) - xeruf
显示剩余5条评论

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接