Upload a project from one gitHub account to another - visual-studio

I have a project in one GitHub account and I want to upload it to another account without giving access to the first account and the first folder.
I could not find a normal upload option because the old GitHub account has already been embedded on the project.
I tried both Visual Studio and through CMD, maybe there is another option to do it?
Wait for an answer.
I did it: (GitHub instructions)
git remote add origin https://github.com/UserName/FolderName.git
and get
error: remote origin already exists.

Related

How to create a GitHub Desktop repository with more folders each with its project

When following steps:
GitHub Desktop/File/Add Local Repository/XYFolderWithXcodeproj
And the following steps via as per video "Github Desktop Tutorial on a Mac" starting from (2:32), I could create repository when the XYFolderWithXcodeproj folder did contain only one project.
However, in case the XYFolderWithXcodeproj folder does contain two folders each with its projects, the GitHub Desktop does initiate the repository that was already created months ago and with directory path only up to Documents folder.
(I did remove it, still is was not possible to remove it with having selected the option "Also move this repository to Trash".
When trying to do this, there was message: "Failed to move the repository directly to Trash. A common reason for this is that the directory or one of its files is open in another program.)
Would like to ask for advice what steps to follow to create a GitHub Desktop repository with more folders each with its project.
Failed to move the repository directly to Trash.
A common reason for this is that the directory or one of its files
is open in another program
Then try and close GitHub Desktop, then, from a file Explorer, delete the local repository you do not need, and re-open GitHub Desktop.

PyCharm uses Git account from Credential Manager

On my Windows 10 machine I need to have two Git accounts and I have no idea how to setup it. I have read about setting different values at different projects but my problem is slightly different. So I use Git in my Visual (Git extension for VS 2017 ; and my boss authenticated once ater cloning repo with his acc) and in PyCharm (build in version control).
When I want to push changes from Pycharm to my public Github repo I am getting error saying that my boss account is denied permission. And after deleting it from Credential Manager, I can push, pull everything.
After switching to Visual and doing something Git related, there is a entry added to Credential Manager.
And I am in loop. I need both things to work.
And I am in loop
Only if both remote repositories (the working one, and the public one) are both on GitHub.
Then the credential helper "manager" would only record one credential (username/password) for "github.com".
An alternative would be to use an SSH URL instead of an HTTPs one.
Then you could easily distinguish the credentials to use for each repository, as I mentioned in "How to set up authentication for two separate GitHub accounts from same ssh client?".

Xcode Pushing GIT to Visual Studio Team Service

We're learning about and setting up source control with Visual Studio Team Services.
We have one Mac XCode project want to add to the source control, but I can't figure out how to do it.
According to this: https://www.visualstudio.com/en-us/docs/git/share-your-code-in-git-xcode We should be able to set it up as a remote repository, and then just push to it, but when I try I get this error:
The source control operation failed because the URL http://project.visualstudio.com/_git/myprojectname%20IOS" cannont be used with Git. Make sure the URL is valid and try again.
It never asked for a password or anything, so I don't know if I just have a permission set up incorrectly somewhere?
The space was the problem. Created a new project without the space and it popped up asking for the alternative credentials for the project.

How to create a git repository on a shared windows machine which all developers can push to

I have created a bare Git repository on a shared windows machine on a local area network. I am experiencing a problem in which nobody else but me is able perform a push operation. When trying to sync with or push to the remote repository using the Visual Studio 2013 Git tools, other users receive an error reading "Opening repository: .The following errors were reported during push: refs/heads/master, Failed to rename lockfile to '/refs/heads/master': Access is denied." There seem to be a lot of similar questions about creating a shared repository on stack overflow though none of them have given me the right solution for my problem. One thought is that I may need to create a repository user group, perhaps based on our domain user groups, though I do not have any idea how to do this with Git on Windows and have not found any resources for instructions as of yet.
You can share the folder that contains the bare git repository, and just add those Windows users as people who can read and write to those folders. After making a folder "shared" Windows should tell you what the network path should be. Then it's a simple git clone file:////MACHINE_NAME/path/repo.git.

git permission denied on pull/push

I'm trying to create a project using git, but after cloning repository from github in phpstorm i can commint/push/pull only once. After that I see the message about permissions denied on files: COMMIT_EDITMSG or FETCH_HEAD.
I set .git folder visible and not only readable and i can do one commit/push/pull and after permissions denied again. And .git folder become hidden and only readable.
In windows I set full access for .git folder and it files, but got same effect.
Cloning through phpstorm or console have no difference.
ps: Sorry for my english. And some names and title maybe not correct because I have russian windows.
pps: i've scanned my PC and found no viruses.
You can't push to other people's repositories unless they give you permission.
If you want to push the code back to github, fork it first on github, then do a "git clone" with the URL of your own fork, not the original repository.
You should then be able to do pushes to your fork.
Make sure you have configured your public SSH key(s) in the github account settings.
After pushing your changes to your fork, you can do a pull request on github so the original project can merge your changes into their repository.
I had a similar problem. First i tried identified myself in IDEA Jetbrains via userName / password and Test Connection confirmed the correctness of my input. But the comit and the push, etc. only worked with other applications. Not with Jetbrains. but now i used token variant. and that works. :)
https://youtrack.jetbrains.com/oauth?state=%2Fissue%2FWI-41232

Resources