I set up my first gitHub SSH key this morning and am having a few problems.
The first is that there is now a hidden .git file on my computer that is taking up 55.6GB of space.
I followed the instructions here to set up the SSH Key:
https://help.github.com/articles/generating-an-ssh-key/
When I tried to create a new repository I’m getting errors that say “Xcode can’t verify the identity of a repository hosted on “github.com”
At this point I’m extremely confused where I went wrong. Is it possible to delete all SSH Keys and anything local that is taking up space on my machine and start over?
File size screen: https://www.dropbox.com/s/chgyaxewl78zrik/git_file_Size.png?dl=0
Error on upload: https://www.dropbox.com/home/_IOS?preview=Screen+Shot+2016-10-03+at+6.17.29+PM.png
At this point, I would like to delete and SSH keys on my machine and basically start fresh. If anyone has insight on how these massive files were formed please let me know, and if there are any tips on how to make sure this doesn’t happen are greatly appreciated.
Git is a version control system. It allows you to control the changes on your files by making snapshots of how all your files (and then only changed files) look at the moment of the commit. You can read more how this awesome tool works here.
The problem is you have initialized or cloned a git repo on your home folder and git probably made a snapshot of all your files. You can safely rm -rf ~/.git to get rid of the repo.
Edit: Maybe you'll want to erase the code that was in the repo too. Next time you initiate a git repo, do it in a separate/isolated folder.
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
I have this issue with Xcode 5 where I'm trying to commit a file to a remote git repository (BitBucket) and getting a pop up window with the following error: "The repository "project_name" could not be reached. Please verify that the repository is online and reachable and try again."
I've been working with this setup for awhile now (since Xcode 4) and didn't have any problems with it. Under Xcode->Preferences->Accounts->Repositories I saw the correct repository, but duplicated. I deleted and added it again, but it didn't help. I tried closing the project and rebooting the computer and it didn't help either. I can see the project's history under Source Control->History. I can access the repository on BitBucket.
Any idea where this is coming from and how to solve this issue?
Not sure if this helps in the tracking down of this problem, but here goes anyway:
I have been connecting to a local network git repository perfectly well for a number of months, but I encountered this problem later yesterday and nothing I did seemed to improve the situation. That included:
Rebooting both the development machine and the server;
Reinstalling Xcode from the App Store;
Re-cloning the project from the git command line (which could see the repository perfectly well);
Checking out the repository from Xcode (I was able to check out but every other operation, such as , Commit, Refresh Status etc. seemed to cause the problem...)
Manipulation the repository with SourceTree (which could also see it fine).
Eventually I stumbled across a solution to my local issue. If I launch Xcode with a wired and wireless network enabled then I can't see the repository. If I close it, disable wifi and relaunch it then I can.
I've not had much opportunity to work out what the difference is (especially as the wifi connects to the same network and is the secondary choice for networking) but it does seem to fix it.
Hope that might help others and hopefully I can find a real explanation soon!
Dave,
Well it seems this had nothing to do with Bitbucket.
The problem was a messed up .git folder on my machine.
My project resides in a Dropbox folder. Somehow, perhaps because of accessing it from different machines, it created copy/duplicate files in the .git folder and it messed up Git. After fixing all the conflicts Git returned to working as usual and I was able to commit from Xcode to the remote repository.
Now, if you encounter this issue, you might not have the same setup as mine or work on Dropbox or any similar service, but I strongly recommend checking your Git folder thoroughly. Good chance something is messed up there.
Check internet connection of system.also quit xcode and reopen it.
I'm new to git, and I just downloaded it yesterday. As a test for my first online (not local) repo, I committed a useless text file and then hit publish. After a short while, I got this very non-descriptive error:
So I know that I can't publish to this branch. There's only one and it's the master branch. Does anyone have any further information on what might be causing this error?
As a side note, my partner has successfully uploaded files to the same repo, but I haven't gotten any sort of indication that this has happened. Does this mean I'm not connected to the repo properly in some way? I was the one who set it up!
In Windows, right click on your repository --> click on open a shell here
You will see a command prompt.
type git push in it. (been aware after seeing SimonBoudrias comment)
The command prompt will suggest you to type some other command or shows an error.
If the command prompt suggest you to type something else, then type that. It will work.
If the command prompt shows error then please post the detailed error here.
Info: You might want to check this app
Open a shell in your repository. Then type
git push --set-upstream origin master --force
This will upload your local repo to the server no matter what, overwriting if necessary. This should only be done if you're sure nobody else is publishing to your repo at the moment.
I had the same issue as mentioned here, but none of the solutions mentioned above helped. Then I found this answer which talks about Proxy settings, which is exactly why GitHub was failing to commit on my machine. Hope this helps somebody else
To set up your Proxy Settings, you just need to use this command:
git config --global http.proxy
http[s]://userName:password#proxyaddress:port
To fix it, open a command prompt in the repo. For example by pressing the cog in the top right in the repo view and selecting "open a shell here".
In the command prompt, type git push --set-upstream origin master
Either this will work, or it will say ! [rejected] master -> master (fetch first)
If this happens, type git pull origin master (add --rebase if you like)
In GitHub the Publish-button might still be visible instead of the sync button. If this is the case, simply restart GitHub.
What this does is resetting the default remote branch for your local branch to master.
Maybe you just forget type something to the Description area when you commit your files. Someone like me only type the summery.So make sure you have fill in the Summary and Description when you commmit.
Just type something to the Description textarea when commiting. Then i published successfully.
what i do?
1 Go to the folder of your repository in Windows Explorer
2 delete the file your want to publish. and recreat it.
3 Open GitHub For Windows and click on your Repository .then you will find Uncommitted changes on left side.
4 type your Summary
5 type your Description.(the most important step !!!)
6 commit to master
7 Hit Publish and You should be successful.
This is my first answer. so i have no 10 reputation to post an image......hope help you.
Another possibility is a temporary unavailability of GitHub servers.
I'm just having the same problem and confirmed that it's a server issue: https://status.github.com/
Sample screenshot:
I had this error since I forgot to add remote repository link in the GitHub desktop. Once added the correct repo link, everything worked.
Try to commit your changes before publishing. It helps me to solve same problem.
I too had the same problem while publishing my GitHub page. I solved it in the following way.
$git push
I got the error message here. Then I made a pull request
$git pull
After this I made the push again
$git push
Here I got the solution
Note:I use GitHub for windows,And finally published the page using it
I was getting that error because I hadn't properly configured my name and email. On the page where you do that (in the native app, at least), you'll see that the page opens with your name and email already filled in but that doesn't mean that they're saved as settings. In order to save them, you have to press the check mark in the bottom left corner of that screen.
I got this error because I already had created a repository with the same name on github, and then created it locally and tried to commit it. The solution was to delete it from github, then commit it from the local client. Now they're in sync.
I decided to try out the integrated version control feature in XCode 4 (using git). I have an ssh config file that looks similar to this:
Host server
Hostname server.example.com
Port 1234
When I add the repository to XCode I give it the url git#server:repo.git. It is able to clone the repo just fine. Now comes the problem. When I want to push commits to the remote repository, XCode tells me "Repository is offline" (with the little red light). It disables the "Push" button so it won't even try. However, I can pop open a terminal and push it from there just fine (git push).
Is there any way to tell XCode to back off and ignore that "error"?
Thanks.
It doesn't look like you can. XCode appears to be checking to see if it can resolve the name of the remote machine. A workaround is to add server to your hosts file so that it resolves the address. The ip address doesn't even have to be correct since it is discarded anyway when the ssh config file is read.