How can we help you today? How can we help you today?

SQL Source Control, GIT and Visual Studio Online

Is there a step by step document that walks through how to set up SQL Source Control with GIT and then push to Visual Studio Online? I have GIT configured to synch with Visual Studio Online. That works just fine from the file system using the Tortoise GIT client. I have SQL Source Control configured to use GIT, and that seems to work fine as well. I get a message in SQL Source Control that I need to push the change, but then I get a Source Control Credentials required dialog box. I put in my VSO credentials, but it never authenticates. Again, I can push to VSO from the file system using the Tortoise GIT client.

Versions:
SQL Source Control: 5.7.6.6321
GIT: 2.14.1
Tortoise GIT: 2.5.0.0

Thanks
Henry Winkler
HWinkler
0

Comments

13 comments

  • AlexYates
    Command line.

    > git push

    I know.
    AlexYates
    0
  • HWinkler
    Just so I'm clear - there's no way to do this via the SQL Source Control UI?

    I'm assuming your "I know" comment was intended to head off any screams of disbelief/frustration.
    HWinkler
    0
  • HWinkler
    Maybe I should ask a different question - is there a way to configure SQL Source Control to synch with Visual Studio Online directly? I don't have to have GIT in the middle if I don't need to.
    HWinkler
    0
  • Tianjiao_Li
    Hi @HWinkler

    Can you please try:
    1- create a Personal access token https://docs.microsoft.com/en-us/vsts/accounts/use-personal-access-tokens-to-authenticate
    2- clone the repository to your PC (manual clone or via VS)

    q41a6al27l73.png

    2- Click the database, go to Set up in SQL Source Control --Link to my source control system -- Git, paste the path of the local repository that you've cloned.

    6vgsgqod9trw.png

    3- Click 'Link', and choose access token and put in your Personal access token.
    SQL Source Control will remember the token so you don't need to re-enter it in the case of relinking.

    I hope this helps. Please let me know if you need more information.

    Thanks.

    Tianjiao_Li
    0
  • Shaun5Stu
    Tianjiao - does this actually work with SQL Source control version 5.7.6.6321? That is the version the OP had and what I have, but my screen for linking the database is different and does not give me an option to use a personal access token.
    Shaun5Stu
    0
  • Tianjiao_Li
    Hi @Shaun5Stu

    Sorry I should have been more clearer. You won't be prompted Access Token request until you try to Push or Pull from remote.

    For example:


    After click Continue, you'll need to use Access token to complete the Push.


    Tianjiao_Li
    0
  • LlewellynAtBluestone
    I have the same issue.  Using the Git Push in Powershell is works. When I use the Access Token it fails very fast... Almost too fast.  Makes me wonder if its even trying.  I also tried using the Username and password which I created the VSTS (Azure DevOps) repository with... No luck
    LlewellynAtBluestone
    0
  • LlewellynAtBluestone
    Oddly the Pull from remote repository works so I assume all my credentials are good and the Push has a bug
    LlewellynAtBluestone
    0
  • SinisterPenguin
    Same issue here, any more feedback on this one? Is it confirmed as a bug? am I doing something dumb? 

    ....Update - looks like I am doing something dumb. Though it would be MEGA helpful if SQL Source Control gave you the FULL error message & not just a simple 403.
    SinisterPenguin
    0
  • chris_godfree
    I'm trying to get SSC (v7.0.6.8775) set-up to push to an Azure DevOps git repo. I have linked the repo successfully and committed changes but when I try to push changes I get to the same Continue button as per the first screenshot from @Tianjiao_Li but never get an option to add credentials and just get an authentication failure message. Any ideas as to how to solve this? I have previously been successfully committing to a TFS git repo through a git command line.
    chris_godfree
    0
  • Mike U
    SQL Source Control 7 now uses the Git command line for all its operations. Have you been able to push successfully using the command line?
    Mike U
    0
  • chris_godfree
    Mike U said:
    SQL Source Control 7 now uses the Git command line for all its operations. Have you been able to push successfully using the command line?

    Hi Mike, yes, I've been able to push successfully using the command line.
    chris_godfree
    0
  • Mike U
    Are you prompted for any credentials while pushing from the command line? You may need to modify the relevant git.config so that it remembers credentials.
    Mike U
    0

Add comment

Please sign in to leave a comment.