Kong / Kong/insomnia

Cannot sync repo with Git repo

Open
#6,012 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
40k
Forks
2.4k
Avg merge
2d 13h
Merged PRs (30d)
61

Description

I've tried multiple methods of getting a new Bitbucket repo to sync and it fails in various ways.

### Clone method

If I try to initially create something in the project using the Clone feature I get `Auth Failure` even though the credentials are correct. It looks like it's injecting `git+` at the start of the git url, which is strange because it does not do this when using the other method (below). Same things happen with a Github repo using the Git tab (instead of the GitHub tab).

![image](https://github.com/Kong/insomnia/assets/19174503/502a7cb6-161b-41fc-9355-1e4db2e160c0)

I know the creds are correct because the auth works in the Setup Git Sync method (see below) and I can use them with the Bitbucket API to pull a list of files from a repo successfully...

![image](https://github.com/Kong/insomnia/assets/19174503/9adca433-ec7c-4969-9527-ebc3aa68ac8a)

### Setup Git Sync method
When trying to use the git sync method within a design doc the initial setup and authentication works but I get a `Could not find master` error when trying to pull. The master branch is there on the remote so not sure if it's failing to find it locally because it failed the checkout or what. The log is quite vague.

![image](https://github.com/Kong/insomnia/assets/19174503/a89e84ca-2b8d-4096-98fd-b28c2ed5fe6f)

This method works with a Github repo but the default branch name is `main`, maybe that's why?

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Clone feature, the Git tab, and Setup Git Sync within a design doc, then reproduce the report with a Bitbucket repository using the master branch and a GitHub repository using main. Done means valid credentials work without the unexpected git+ URL behavior and Git Sync can pull the remote default branch with a useful error when it cannot.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, github, typescript
Domain
desktop, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.