V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
hackingwu
V2EX  ›  程序员

gitlab 不能通过 https 来 clone 只能 ssh,大家有遇到过吗

  •  
  •   hackingwu ·
    hackingwu · 1 天前 · 1635 次点击

    gitlab 不能通过 https 来 clone 只能 ssh ,大家有遇到过吗?

    24 条回复    2025-05-08 18:13:27 +08:00
    hackingwu
        1
    hackingwu  
    OP
       1 天前
    启用了 2FA
    orFish
        2
    orFish  
       1 天前
    报错信息呢。。
    duzhuo
        3
    duzhuo  
       1 天前
    @orFish 一起给楼主算一卦好了哈哈
    mc2tap
        4
    mc2tap  
       1 天前   ❤️ 2
    我只遇到过只能通过 http 来 clone 不能使用 ssh 的
    MoYi123
        5
    MoYi123  
       1 天前
    遇到过, 没设置账号密码就不让用 http
    Goalonez
        6
    Goalonez  
       1 天前 via iPhone
    有 2fa 本来就不能 http 拉吧
    konakona
        7
    konakona  
       1 天前
    不喂我报错信息就希望我回答你吗?
    可恶,网友现在待遇比 deepseek 还差……
    XiLingHost
        8
    XiLingHost  
       1 天前
    有 2fa 还想通过 https 方式 clone ,那你得设置 access token
    orFish
        9
    orFish  
       1 天前
    @Goalonez
    @XiLingHost 就算没启用 2fa ,也应该用 access token 来拉代码才对。
    hackingwu
        10
    hackingwu  
    OP
       1 天前
    @XiLingHost 我设置了,为啥还不行呢
    MFWT
        11
    MFWT  
       1 天前
    在没有错误日志的情况下诊断问题,无异于闭眼开车
    Rickkkkkkk
        12
    Rickkkkkkk  
       1 天前
    错误日志粘到 ai 里,一般都能得到答案
    XiLingHost
        13
    XiLingHost  
       1 天前
    @hackingwu 你看了文档吗,access token 也是需要用户名的
    cz5424
        14
    cz5424  
       1 天前 via iPhone
    @duzhuo 算了,大凶之兆,可以 v 我 50 ,可解此卦
    mark2025
        16
    mark2025  
       1 天前
    gitlab 后台可以设置仅 ssh 交互
    just1
        17
    just1  
       1 天前
    @mc2tap 有的梯子会 ban 22
    nevermoreluo
        18
    nevermoreluo  
       12 小时 56 分钟前
    给下报错不行嘛。。。。

    只好猜了,这回我猜证书错误,不要想当然的以为浏览器证书正常,git 也能正常解析
    `git config --global http.sslverify false` 试试
    https://community.letsencrypt.org/t/production-chain-changes/150739
    shintendo
        19
    shintendo  
       11 小时 25 分钟前
    @hackingwu 别光说“不行”,你倒是说什么现象,什么报错
    liuidetmks
        20
    liuidetmks  
       6 小时 31 分钟前
    @just1 ssh over 443
    ACCI
        21
    ACCI  
       6 小时 17 分钟前
    跟你相反
    我司 gitlab 不能通过 ssh 来 clone 只能 https .
    刚来公司时候搞了大半天都拉取不下来....
    youwh
        22
    youwh  
       4 小时 37 分钟前
    是不是更新了 17.11.1 ,前天更新之后也遇到了。
    lulaolu
        23
    lulaolu  
       4 小时 14 分钟前
    文档有写的: https://docs.gitlab.com/user/profile/account/two_factor_authentication/#use-personal-access-tokens-with-two-factor-authentication

    “When 2FA is enabled, you can’t use your password to authenticate with Git over HTTPS or the GitLab API. You can use a personal access token instead.”
    sampeng
        24
    sampeng  
       3 小时 54 分钟前
    因为。。就是不能用帐号密码拉啊。。。。不然 gitlab 也就太"安全"了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2923 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 19ms · UTC 14:07 · PVG 22:07 · LAX 07:07 · JFK 10:07
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.