Gitea:推拉操作未经授权

kse8i1jr  于 2022-11-20  发布在  Git
关注(0)|答案(1)|浏览(381)

Gitea是通过Kubernetes集群上的一个helm chart来设置的。与Gitea - SSH Auth ok but can't push to remote一样,SSH Auth可以很好地与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.

我不知道该怎么办...

gab6jxml

gab6jxml1#

如果您确实看到带有ssh -Tv git@your.Gitea的“Hi there, You've successfully authenticated, but Gitea does not provide shell access.“,这意味着您实际上没有“正确的访问权限”。
或者您在存储库URL中犯了一个小错误(小写/大写,或者打字错误)。
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

相关问题