Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

SourceTree to GitHub Enterprise

dustinplatter May 2, 2019

Hi all. I have read a number of the post on this site regarding the subject, so if I'm overlooking something I apologize but I have tried to resolve this before asking the question.

I am using SourceTree 3.1.2. I am trying to connect to my companies GitHub Enterprise account. However, I'm not able to get anywhere. Putting the things I've tried below. Step by step instructions would be appreciated, cause my bumbling attempts aren't working. 

Add Account

  1. Select Remote
  2. Click Add an Account
  3. Select GitHub Enterprise
  4. Host URL = github.build.mycompany.com/Project/repository
    1. for SSH it's = git@github.build.mycompany.com:Project/repository.git
  5. I have tried both HTTPS and SSH
    1. Loaded my private key into SourceTree via Putty Key Generator and copied the Public Key over to GitHub Enterprise (including the first line 'ssh-rsa...'
    2. SSH client Config has key loaded and SSH Client set to Putty/plink with Auto-start on
  6. Put in the userID from github
  7. Hit Refresh Password and put in my GitHub password
  8. Authentication Failed, Failed to check login for user

Clone

  1. I have also tried close with the below (SSH path is unregognize) 
    1. https://github.build.mycompany.com/Project/repository.get
  2. I get prompted for git credential
  3. But it results in 'Repository Type: This is not a valid source path/URL'
    1. The details seem to indicate that Password Auth is not available and to use a SSH key (which I've already set up.

4 answers

1 vote
Joel Louie Miranda May 9, 2019

Hi guys, I am having the same problem and has pasted the errors I got on this link.

But, repasting the error here again.

https://community.atlassian.com/t5/Sourcetree-questions/Github-Enterprise-Login-Unexpected-char-encountered/qaq-p/1079585

 

Unable to parse the response from the host service.
Please check the host url details for this account. It's likely that Sourcetree tried to contact an unrecognized service.
Unexpected character encountered while parsing value: <. Path ", line 0, postion 0.

 

I am really hoping this can be fixed soon please

Anmol Jain December 11, 2019

I am able to clone to repo from Github enterprise using the below method

Annotation 2019-12-11 141938.png

Like # people like this
Sara December 16, 2019

Thanks, this solved my issue!

NumericOverflow February 19, 2020

+1 @Anmol Jain suggestion solved my issue too. 

Can someone from Atlassian put this in the documentation perhaps? Seems like a very common situation to require digging through forums instead of the official docs on how to connect.

Like # people like this
sandeep teerth March 31, 2021

Anmol jain, thanks a ton for this post , i was annoyed of using github desktop app with github enterprise.... this soultion works for tortoise git also. Super solution. Thanks a ton :)

Like # people like this
Damayanti Gupta October 15, 2021

Where is the solution?

Anmol Jain August 7, 2022

please see my previous post in this thread for solution. or let me paste the solution again for reference. Please observe the first textbox in the screenshot below.

Annotation 2019-12-11 141938.png

tayyabhussain October 13, 2022

@Anmol Jain whats personal_token?

 

Edit: Nevermind, got it, thanks

Anmol Jain October 13, 2022

It’s the personal access token that you need to generate from GitHub user profile section 

1 vote
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 6, 2019

Hi Dustin!

Welcome to the Community and thanks for your super detailed description, this really helps us get faster to the root cause of this issue. I can see that you're having difficulties trying to connect and clone from your Github Enterprise account, there're a few more things we need to know to continue helping you with this:

  1. Which operating system are you using?
  2. Which browser are you using? If you're using Internet Explorer, can you confirm that it's updated to the latest version? We've seen authentication issues when the version was an older one. 
  3. In both examples, you got an error during the authentication. Can you try logging into your Github account directly via the browser and double check that the credentials you're using are the right ones?
  4. Are you using 'Embedded Git' or 'System Git'? Which Git version do you have? (You can find this at Gear > Accounts > Git)
  5. For troubleshooting purposes, are you able to clone from that account directly using the command line?

Let us know! Once we get the responses we'll be able to troubleshoot this issue with you.

Kind regards,

Ana

dustinplatter May 6, 2019

Good morning Ana,

     I'm running Windows 10 Pro 64-bit. As I mentioned I'm trying to get my 3.1.2 SourceTree to connect to a GitHub Enterprise account. So Browser is not really part of the equation. 
     I am able to clone the repository using GitHub Desktop, but not SourceTree. I'm actually hoping to get my team to switch from GitHub Desktop to SourceTree, but not being able to connect is a bit of a hurdle ;). 
     Credentials is the one area I'm unsure about. I've tried using both my GitHub login/password, as well as the Personal Access Token I've created specifically for Stash. Neither works. I have created multiple PAT to ensure that I'm using the correct string, but neither works. I am also positive I'm using the correct username/password. 

    In both cases I get the below message.
SourceTreeLoginError.PNG

Like # people like this
dustinplatter May 13, 2019

Hello Ana. I was wondering if there has been any update following the additional information I've provided? 
I used SourceTree extensively at my prior company and I think it would greatly benefit my new team. I'd love to work with you to resolve this issue and be able to show my team the benefits of your product.

 

Thanks

Like # people like this
alex gonzalez August 21, 2019

I have exactly the same problem, the only difference is that I use Windows Enterprice but I don't think it's important.

As additional information, I use Symantec double factor authentication (VIP Access). I think that could be the problem ...

Like Xavier likes this
Xavier December 2, 2019

Same here.

Works on Mac but not windows :(

Kakit Law January 13, 2023

Encountered the same error message today and struggled a bit with combinations of username/email + password/PAT.

Found the solution by importing "remote repositories" in sourcetree > remote tab > Add an Account.

2023-01-13_12h43_30.png

0 votes
Dimitri P. May 28, 2020

@Anmol Jain and Team,

I am still not able to add the remote of GHE under ST.

I am injecting this under remote : https://MYTOKENINPLAINTEXT@github.com/MYCLIENT.git

Same thing when I try to add an account - wrong URL or user not recognized

Note - I activated the SSO on the Token on the GHE side of things. 

Message : Userm / Email was not found

Thanks ^^

Dimitri P. May 29, 2020

Anyone any idea please?

Dimitri P. May 31, 2020

@Ana Retamal any idea please?

Dimitri P. June 3, 2020

I think I found a solution by inserting a Source Tree SSH key in Github, then activating SSO on it under GHE, and finally simply cloning repos in SSH under ST. Let me know if this works for you folks? ^^

0 votes
Ivan Golovic May 24, 2020

I am encountering same problem as the OP described on a clean installation of Windows 10 and Source Tree (in May 2020. so obviously nothing was fixed :/ ). I was able to clone the remote repository but I am not able to push to it, described situation happens.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events