Git 推送在 Visual Studio 2015 中不起作用 [英] Git push not working in visual studio 2015

查看:40
本文介绍了Git 推送在 Visual Studio 2015 中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 Visual Studio 2015 在 Git 连接到 BitBucket 时运行良好.但是,当连接到私有 Gitlab 服务器时,我遇到了一个奇怪的问题:- 我可以通过 IDE(团队资源管理器)从 gitlab 服务器克隆一个 repo.每当我尝试将本地提交同步到服务器时,我都可以获取/拉取,放置,但出现错误(推送到远程存储库时遇到错误... 500 ...).显然 gitlab 服务器返回 500 内部服务器错误.但是,当我从团队资源管理器中打开命令行并发出git push"时,没有错误并且推送成功.

My visual studio 2015 works fine with Git connecting to BitBucket. However when connecting to a private Gitlab server, I have a weird problem: - I can clone a repo from the gitlab server via the IDE (Team explorer). I can fetch/pull, put whenever I try to sync a local commit to the server, I get an error (error encountered while pushing to the remote repository... 500...). Obviously the gitlab server returns a 500 internal server error. However when I open a command line from within team explorer and issue a 'git push', there are no errors and the push succeeds.

  • 团队浏览器推送和命令行推送有区别吗?

  • Is there a difference between the team explorer push and the command line push?

有没有办法在推送时查看团队资源管理器向 gitlab 服务器发送的请求?

Is there a way to see what request team explorer sends to the gitlab server while pushing?

推荐答案

进一步检查后,我发现 GIT 命令行客户端与 Visual Studio 中的内置客户端之间存在差异.后者对 https 会话使用 TLS1.2,而命令行使用 TLS 1.0.

On further inspection I found a difference between the GIT command line client and the builtin cliënt in visual studio. The latter uses TLS1.2 for the https session, whereas the command line uses TLS 1.0.

碰巧私人 GITLAB 服务器位于反向代理后面,该代理存在 TLS1.2 连接问题,导致奇怪的行为(获取和拉取 OK,不推送).

As it happens out private GITLAB server is situated behind a reverse proxy that has problems with TLS1.2 connections resulting in the weird behaviour (fetch & pull OK, no push).

这篇关于Git 推送在 Visual Studio 2015 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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