Running into problems importing my Azure DevOps repo #182813
-
Select Topic AreaQuestion BodyI've been following the Importing a repository with GitHub Importer from my Azure DevOps Services account to my GitHub account. But it didn't work. I tried once, and the Importer said I should try it again, so I did. That failed with a
error, which I didn't find helpful. Here are some details:
Given all I've provided here, what could be preventing the GitHub Importer to import the Git history and source code from ADS to a new repo here on GitHub? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Identified Problems and Solutions:1. Azure DevOps Credentials Issue
2. Incorrect Repository URL
3. .git Extension Problem
4. Branch Name Conflicts
Alternative Import Methods:Option A: Manual Import via Git CLI# 1. Clone from Azure DevOps
git clone --mirror https://username:token@dev.azure.com/your-organization/your-project/_git/your-repository
# 2. Create new empty repository in GitHub
# 3. Change to cloned directory
cd your-repository.git
# 4. Push to GitHub
git push --mirror https://github.com/your-username/your-new-repository.gitOption B: Use GitHub CLI# Install GitHub CLI if you don't have it
gh repo create new-repository --private --source=https://dev.azure.com/your-organization/your-project/_git/your-repositoryOption C: Clone Locally Then Push
git remote remove origin
git remote add origin https://github.com/your-username/new-repo.git
git push -u origin --allRecommended Step-by-Step Solution:
|
Beta Was this translation helpful? Give feedback.
-
|
The GitHub Importer usually fails with this generic error when it can’t properly authenticate or access the Azure DevOps repository, even if the credentials look correct. This is often caused by Azure DevOps requiring a Personal Access Token (PAT) instead of your normal account password. GitHub Importer does not reliably work with standard ADS credentials. The repo URL not ending in .git is fine, and the master vs main default branch difference does not matter for importing. GitHub will handle that automatically. The recommended solution is to generate a PAT in Azure DevOps with code read access and use that token as the password when GitHub Importer asks for credentials. If it still fails, cloning the repo locally and pushing it to GitHub manually is the most reliable workaround. |
Beta Was this translation helpful? Give feedback.
Hello,
The error you're seeing (
GH007: Your push would publish a private email address) occurs because the commit history in your Azure DevOps repository contains your private email address, and GitHub has protection enabled to prevent it from being exposed.You do not need to permanently disable your email protection. You have several options, from the quickest to the most secure:
Option 1: The Quickest (Temporary)
git pushthat previously failed. It should now work.…