Git push在Git Bash中有效,但在SmartGit或TortoiseGit中无效 [英] Git push works in Git Bash but not in SmartGit or TortoiseGit

查看:124
本文介绍了Git push在Git Bash中有效,但在SmartGit或TortoiseGit中无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我使用Git Bash创建了一个存储库,它可以工作(github.com上的本地和远程存储库).我已经推送了README文件进行测试,并且可以正常工作.在我的配置中,一切似乎都没问题:

So I've created a repo using Git Bash, and it works (Local and Remote repo on github.com). I've pushed README file for testing, and it worked. In my config everything seems okay:

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[gui]
    pruneduringfetch = true
    encoding =
[remote "origin"]
    url = git@github.com:SOME_USERNAME/some-project-name.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master

然后 $ ssh -V git@github.com 给出:

SOME_USERNAME,您好!您已经成功通过身份验证,但是GitHub确实不提供外壳程序访问权限.

Hi SOME_USERNAME! You've successfully authenticated, but GitHub does not provide shell access.

我能够推送文件和所有内容,但只能通过Git Bash.但是,我尝试使用它,但它给了我以下错误:

And I'm able to push files and everything, but only through Git Bash. However, I've tried to work with and it gave me the following error:

远端意外挂断

当我手动将原始"网址更改为此:

When I manually changed the "origin" url to this:

https://SOME_USERNAME@github.com/SOME_USERNAME/some-project.git

有效.因此,它不适用于"git @ ...",但适用于"https://..".我尝试了另一个程序-SmartGit.这也给了我

It worked. So it doesn't work with "git@..." but do work with "https://..". I've tried another program - SmartGit. It also gives me

远端意外挂起

但是当我尝试在SmartGit中执行此更改URL技巧"时,对于"https://...",它会给我以下错误:

but when I try to do this "change url trick" in SmartGit, for "https://..." it gives me the following error:

推送:身份验证失败

Push: Authentication failed

身份验证失败设置远程

设置协议不支持的远程服务路径.

Setting remote service path not supported by protocol.

我对所有这些东西完全迷失了.我在做什么错了?

I'm completely lost with all this stuff. What am I doing wrong?

推荐答案

尝试以管理员身份运行SmartGit.

Try running SmartGit as administrator.

这篇关于Git push在Git Bash中有效,但在SmartGit或TortoiseGit中无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆