Can't connect to private GIT repository on local network - 'Credentials required for the repository'

I want to have a private GIT repository on a Windows-10 PC on my local network, and access it from Xamarin Studio on my Mac (El Capitan).

Being new to GIT I first tried out things out using only GIT and SSH, that is, without Xamarin Studio, and that was successful. The steps I followed were:

  1. Installed GIT on Windows-10.

  2. Installed an SSH server (Bitvise) on Windows-10 and configured it for public/private key as per and

  3. On Windows-10, created a GIT repository using Git Bash on a subfolder of /~/git/repos/ named test.git as follows:
    $ git init --bare

  4. On the Mac, connected to the Windows repository folder - this step was probably unnecessary.

  5. On the Mac, successfully cloned that repository from the Windows machine, using Terminal in an empty folder as follows:
    $ git clone ssh://[email protected]/~/git/repos/test.git

Here william is the username on windows (more precisely a virtual username used by Bitvise to bind to the PKI and the real username).

So far so good. Now I created a new repository called fo.git on Windows, in the same way as above, and attempted to clone it onto the Mac in my Xamarin Studio project. The steps were:

  1. Selected the solution in the project.

  2. On the menu, Version Control -> Publish -> Registered Repositories -> Add.
    Note: To get the Publish prompt I needed to delete an obsolete .git folder hanging about closer to the root directory.

  3. Entered the following:

    Type: Git
    Name: FO
    Url: ssh://[email protected]/~/git/repos/fo.git
    Protocol: SSH
    Server: mywindowsserver
    Port: 22
    Path: /~/git/repos/fo.git
    User: william

  4. Confirmed on 'Are you sure you want to publish the project?'.

  5. I then got a small prompt window headed 'Xamarin Studio' asking for Username and Email. Its not at all clear to me what is wanted here or why, but I entered william for Username, and for Email I entered the email address I had supplied in the earlier PKI process. Notably there was no prompt for a password.

An error message was then issued:
Git Credentials / Credentials required for the repository ssh://[email protected]:22/~/git/repos/fo.git
Version control operation failed
UserNamePasswordCredentials contains a null Username or Password

After some thrashing I have no clue what to try next. Any help would be much appreciated.

-- Bill.

Posts

  • BillFultonBillFulton AUMember ✭✭

    More info: The Bitvise virtual username also binds cached credentials - but hard to see how that is relevant.

  • BillFultonBillFulton AUMember ✭✭

    Xamarin Studio version is 5.10.

  • BillFultonBillFulton AUMember ✭✭

    Here's my solution. I somehow got the idea that many people have given up on Xamarin Studio's version control so I decided to try SourceTree, free from Atlasssian. This worked like a charm and in any case seems to have far superior functionality.

    After creating a new repository called fo.git on Windows, as in my original post above, I took the following steps:

    1. Moved (not copied) my XS project folder named 'fo' aside, to the desktop.

    2. Installed SourceTree.

    In SourceTree on the Mac:

    1. Pressed Remote -> New Repository -> Clone from URL.

    2. For URL, entered SSH://[email protected]/~/git/repos/fo.git

    3. For Destination Path, entered the path to where my 'fo' project folder had previously been

    4. For Name, entered FO

    5. Clicked Clone and exited SourceTree. This recreated the 'fo' folder, containing a .git subfolder.

    6. Copied the contents of the saved 'fo' folder on my desktop into the newly-created 'fo' folder.

    7. Re-opened SourceTree, which displayed the copied, unstated files.

    In Source Tree:

    1. Ignored unwanted files (bin, obj, ...) by right clicking on unwanted files and selecting 'Ignore' then 'Ignore everything beneath'.

    2. Selected all unstaged files and clicking Add then Commit then Push (ticking the 'master' box ).

    Now I have a local repository backed by a remote one.

  • BillFultonBillFulton AUMember ✭✭

    .-1
    'unstated' -> 'unstaged'

Sign In or Register to comment.