账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    关于git的问题,不能push
    20
    0

    和之前一样,最后一步执行git push origin master,这时候提示失败:
    Permission denied (publickey).
    fatal: Could not read from remote repository.

    然后重新设了ssh秘钥,并且ssh -T git@github.com是可以的,返回:
    Hi xxxxxx! You've successfully authenticated, but GitHub does not provide shell access.Connection to github.com closed.
    但是,git push的时候,总是失败,提示是:
    Permission denied (publickey).
    fatal: Could not read from remote repository.
    Please make sure you have the correct access rights
    and the repository exists.

    在网上看到好多答案,比如在 .ssh 文件夹中执行 ssh-add id_rsa,返回是:
    Could not open a connection to your authentication agent.
    又比如,git/config设置的仓库url地址和github使用的链接地址是否一致(注:这个不明白在哪里执行,就去找到想要push的文件执行了),

    cat .git/config,返回是:
    [core]
        repositoryformatversion = 0
        filemode = false
        bare = false
        logallrefupdates = true
        symlinks = false
        ignorecase = true
        hideDotFiles = dotGitOnly
        这个返回跟网上看到的返回不一样,不知道怎么改。
        各位大神赐教啊!!!
        
    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部