带有Bitbucket融合的Git Visual Studio连接到现有项目错误/提取失败 [英] Git Visual Studio with Bitbucket confluence Connect to existing project error / Fetch fails

查看:220
本文介绍了带有Bitbucket融合的Git Visual Studio连接到现有项目错误/提取失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Visual Studio 17从现有的Bitbucket GIT存储库中提取信息?

错误" git失败并出现致命错误.找不到'xyz'存储库"

  1. 我添加了此Misty BitBucket 扩展从市场上购买
  2. 然后,我添加了以下三种类型的选项以及以下
  1. I added this Misty BitBucket Extension from the marketplace
  2. Then I added the Git remote string as below with three types of options and this help page.

首先,我尝试了此字符串-> https://<repo_owner>@bitbucket.org/<accountname>/<reponame>.git& https://<repo_owner>@bitbucket.org/<accountname>/<reponame>,然后我尝试了基于youtube视频&的URL路径.上方设置页面https://bitbucket.org/myrepo/xos/src

First I tried this string -> https://<repo_owner>@bitbucket.org/<accountname>/<reponame>.git & https://<repo_owner>@bitbucket.org/<accountname>/<reponame> then I tried the URL path based on youtube videos & the over settings page https://bitbucket.org/myrepo/xos/src

  1. 我收到存储库不存在的错误消息.

,感谢您提供一些有关如何从Bitbucket设置/拉取/获取/同步代码的帮助.

更新1:添加清除凭据"工具后的错误.提取SSH

Update 1: the error after adding the Clear Credentials Tool & extracting the SSH

更新2:@ Marina-Liu,即使点击了连接,bitbucket连接也不会显示在Visual Studio 2017中

Update 2: @Marina-Liu, even after hitting connect, bitbucket connection does NOT show in Visual Studio 2017

推荐答案

如果您是bitbucket存储库的用户,请确保您具有克隆私有存储库的权限.然后,您可以将Bitbucket存储库的更改拉到本地现有存储库中.

If you are a user of the bitbucket repo, please make sure you have permission to clone the private repo. And then you can pull the bitbucket repo’s changes to the local existing repo.

  1. 登录位桶.

VS->管理连接->登录Bitbucket存储库.

VS -> Manage connections -> login the bitbucket repo.

您还可以在登录后直接克隆一个bitbucket存储库.

And you can also clone a bitbucket repo directly after login.

将位桶存储库添加为远程存储.

在VS中->打开本地存储库->在VS的右下角->它列出您的存储库文件夹名称和分支名称-> Team Explorer->设置->存储库设置->添加遥控器->添加远程名称(例如bit)->输入您的位桶存储库URL(格式为https://bitbucket.org/account/reponame)->保存.

In VS -> open your local repo -> in the right-bottom corner of VS -> it lists your repo folder name and branch name -> Team Explorer -> Settings -> Repository settings -> add remotes -> add a remote name (such as bit) -> input your bitbucket repo url (the format is https://bitbucket.org/account/reponame) -> save.

将位桶存储库更改为本地现有存储库.

首先从bitbucket存储库中获取更改:

Fetch changes from bitbucket repo first:

团队资源管理器->同步->提取->选择刚添加的远程名称(例如位)->提取.

Team explorer -> Sync -> Fetch -> select the remote name you just added (such as bit) -> Fetch.

如果本地现有存储库没有源远程站点,则可以直接从bitbucket存储库中提取更改.如果本地存储库中除了bit以外还有其他远程服务器,则应将bitbucket存储库的更改合并到本地分支中:

If the local existing repo has not the origin remote, you can pull changes from bitbucket repo directly. If the local repo has other remote(s) except bit, you should merge bitbucket repo's changes into the local branch:

团队资源管理器->分支->合并->假设将bit/master合并到master分支->合并.

Team explorer -> Branches -> Merge -> assume merge bit/master into master branch -> merge.


要通过命令行克隆bitbucket存储库,您可以按照以下步骤操作:


To clone the bitbucket repo by command line, you can follow below steps:

  1. 清除现有凭据

  1. Clear existing credential

凭据管理器-> Windows凭据->删除有关bitbucket.org的所有凭据

Credential Manager -> Windows Credentials -> remove all the credentials about bitbucket.org

通过命令行克隆

现在您可以直接通过命令git clone https://bitbucket.org/account/reponam e克隆butbucket存储库,它可以让您输入电子邮件地址和密码.

Now you can clone the butbucket repo by command git clone https://bitbucket.org/account/reponame directly, it will let you to input your email address and password.

这篇关于带有Bitbucket融合的Git Visual Studio连接到现有项目错误/提取失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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