I want configure visual studio code to push change's project to GitLab.
I'm using Linux. Every time that I try do push, show this message to me:
Username for 'https://gitlab.com':
I generated ssh key and put in the GitLab user setting.
Git init, add. and commit works fine.
I generated ssh key and put in the gitlab user setting.
If Visual Studio is asking about https, that means the remote URL associated with your local Git repo is not an ssh one.
In command-line, go to your repo root folder, and type:
git remote origin set-url git#gitlab.com:<yourAccount>/<yourRepo.git>
That will help Visual Studio Code pick the right URL (the one for which you registered your credentials through your public SSH key)
OR: you might want to keep your current https URL, but cache your GitLab username/password (since you don't want to have to enter them every time).
See "Use Git Credential Managers to Authenticate to Visual Studio Team Services" (it should apply to Visual Studio Code as well, and works on Windows or on Linux)
Related
I've been trying to setup a GitHub repository for a xaramin iOS project that I'm doing on my mac.
When creating the project, this is the settings I chose
Setup Image
However on I haven't been able to push to the GitHub repo I want to, I've tried to follow Microsofts guide https://learn.microsoft.com/en-us/visualstudio/mac/set-up-git-repository but it hasn't worked due to Publish in version control being greyed out
Or, if your project is already bound to a git repository, simply add the GitHub remote and push it there.
git remote add github URL_TO_GITHUB_REPO
git push github master
Afterwards, Visual Studio should allow you to push to Github as well as any older remotes that were added locally.
You can always remove the existing remote if you want to:
git remote remove origin
git remote rename github origin
See also: https://stackoverflow.com/a/52052063/736079
Before publishing your project to GitHub from Visual Studio, you must remove any source control :
If you have an existing project that is
not already in version control, use the following steps to set it up
in Git
Removing the .git folder and .gitgnore file should be enough. Then the "Publish in version control..." menu will be available (you might need to restart Visual Studio).
Source : https://learn.microsoft.com/en-us/visualstudio/mac/set-up-git-repository?view=vsmac-2019#publishing-an-existing-project
I use VS Community as a Developer and have spun up my own TFS Server in the past. I have been using Ubuntu more frequently and decided to try out VS Code. I started up Code and installed the Visual Studio Team Services Extension which is what I thought would be what I needed. I've read/tried online that you first have to open up a Solution which then redirects you to sign in to the web portion of their TFS/Teams which is not where my code resides. I was also not able to find the equivalent of the Team Explorer in Windows and the Plug Icon that asks you for a connection.
So my question is, how do you connect to your TFS Server and get your Projects in VS Code for Ubuntu, if possible?
UPDATE: I have gotten closer trying the following but do not have a complete solution. These steps will at least get you closer to connecting to your server.
Run Java -Version to ensure you have at least Java8 if not, run sudo apt-get install default-jre
Next download https://github.com/Microsoft/team-explorer-everywhere/releases/download/v14.114.0/TEE-CLC-14.114.0.zip
Run the command at your download location /../extract TEE-CLC-14.114.0.zip
Run this command to accept the EULA /../TEE-CLC-14.114.0/tf eula
Run this command to connect to TFS (assuming yours is the same as default) /../TEE-CLC-14.114.0/tf workspaces -collection:http://[SERVER IP HERE]:8080/tfs/defaultcollection
Sign in using AD or your Login
Run this command so you do not have to supply creds export TF_AUTO_SAVE_CREDENTIALS=1
Open VS Code > File > Preferences > Settings
On the right side is the user settings add the following "tfvc.location": "/../TEE-CLC-14.114.0/tf" and Save
Restart Code and that's all I have thus far
Below is a short list of steps to get up-and-running with TFVC support:
Install the Team Services extension for Visual Studio Code.
Team Foundation Server requires your domain credentials.
Ensure you have a TF command line client installed (either TF.exe or
the TEE CLC).
Set the tfvc.location VS Code setting to the full path of your TF
command line client.
Open a folder containing a Local TFVC Workspace and sign in when
prompted.
Set the SCM Provider to TFVC.
So your next step is opening either the root folder or a sub-folder of the TFVC repository. Detailed step you can refer to the documentation below:
https://github.com/Microsoft/vsts-vscode/blob/master/TFVC_README.md#quick-start
Also, you could check the video below which shows you how to set up the TFVC support on Windows and demonstrates much of the functionality available for Team Foundation Version Control. The features shown in this video apply equally well to the TFVC support on macOS and Linux:
https://www.youtube.com/watch?v=6IzJ2UPGmoQ&feature=youtu.be
I am trying to connect to a Git repository hosted on VSTS from a Mac machine in Xcode 9. I tried cloning the project using Xcode but it gives me authentication failure error.
I don't get this problem in Windows. I have also tried creating a Personal Access Token in my VSTS account profile and used the secret key but that too doesn't work.
References:-
https://learn.microsoft.com/en-us/vsts/git/share-your-code-in-git-xcode
https://learn.microsoft.com/en-us/vsts/git/set-up-credential-managers
Am I missing on something? Please let me know if I can provide more details.
Update
Somehow I can clone the project to my local using Visual Studio on Mac after generating Git credentials through VSTS. Strange that it does not work with the XCode.
I have not used VSTS, but this answer shows how to connect to a remote repository that's not a GitHub repository in Xcode 9. Start by opening the source control navigator by choosing View > Navigators > Show Source Control Navigator.
The next step is to add a remote branch for your VSTS repository. Select the Remotes folder in the source control navigator, right-click, and choose Add Existing Remote.
Enter the URL of your VSTS repo in the Location text field. Click the Add button to finish adding the remote repository.
At this point you have an empty remote repository in Xcode. The last step is to push your local Xcode repository to the remote repository. Choose Source Control > Push in Xcode to do the push.
You will be asked for a username and password for the remote repository. According to the first link from Microsoft in your question, you should enter your VSTS username as the username and the personal access token as the password.
We are two developers and want to share a project.
On one PC I have VisualSVN server installed (as a SVN server), TortoiseSVN (for adding project to repository), and ankhSVN (for Visual Studio, because it's easier than the others). I can create a repository and add a project to it. On the same PC I can get the project from SVN server using file://path. On the other PC I can browse the repository in a browser using https://PC2/sbn/prj/trunk, and also with repository browser in VS2010.
But when I want to import the project (file, open, open subversion project), I don't know how to address the URL file, because the https address does not work there.
Is there any special way to address that?
From repository Explorer select your host , add user and password and login to the server , then find your solution and then click on check out from svn , then you will be able to get the project from svn server .
I installed git on visual studio 2010 (the installation is done well)
the problem is that I can not download my project in AppHarbor
using git GUI.But If I use (clone git # https://username appharbor.com / projet.git)
I get the project.
thank you
GitExtensions and AppHarbor do not play well together in my experience.
AppHarbor does not use SSH instead you are prompted for your password. GitExtensions does not recognise this prompt and does not let you enter your password. It just appears to hang.
The Git GUI in msysgit does however prompt you for your password, so it is possible and something that needs fixing in GitExtensions.
I just push/pull from AppHarbor with the CLI personally.
Git Extensions includes a plugin for VS2010.
In my workflow, I use GitHub for Windows for almost all Git operations, it's very intuitive and you can jump to Explorer or a shell at any time. And for automatic deployment and testing, I've configure GitHub's Hooks to deploy to AppHarbor from the link on my application's Settings page:
https://appharbor.com/applications/[your_app]/edit