Remote Git repository unreachable in XCode 5 - ios

I have created a remote Git repository for a new project. I have added to my remotes and XCode recognizes it. When creating the new project, I checked the box for Source Control > create git repository on: and selected "Add to New Server"
When I enter my login credentials, I get the following message:
The server https://... is unavailable or may not exist. Check the server address, check your network connection, and then try again.
I have verified that my login is correct and the url is definitely valid. What might I be doing wrong?
Thanks!

Was able to solve my issue using the following:
git remote add origin git#github.com:pheepster/<repoName>.git
git push origin master:master
with the help of: https://stackoverflow.com/a/14470400/2115842

In addition to the two git commands in #Pheepster's answer, I suggest you check you are running the current version of GIT on both the development Mac and Server. Once I had the current version of GIT on both systems the two lines above solved my issue.

Related

XCode - GitHub ´SecureTransport error: I/O error. (-1)´

I'm having an issue when pushing to my GitHub repo (it's an iOS app for iPhone). I haven't had any problem doing this in the last few years. However, without changing anything related to the connection between XCode and GitHub, now I get this error message:
I've checked and all my credentials are up to date, the project is working fine, and I'm able to do commits, but when I do the push. The error appears and no push is done.
Furthermore, I've tried pushing other projects and there is no problem. Also, the push size is not that big.
What should I do to solve this error? I'm using the Source Control functionality of XCode.
When doing the push through command line (terminal), I found out that the error was produced due to a file that had a size of +100MB. I had to remove it and everything went fine.
Remark: That file was a pod library. So, be careful when pushing all your project. At the end, to backup the whole project you just need the podfile, as it is the one you use to install pod libraries.
I had same issue cause of selecting different origin, select default origin and Source Control > Push and select Origin in dropdown then push
I was having this issue then I used terminal and I realised that I needed to add my personal access token to my push request.
To get your personal access token, go to your github.com account->profile->Settings->Developer settings->Personal access tokens and generate a new token. Save somewhere safe as you can only copy once else you have to regenerate again
Initialising and committing your project locally. Skip if you've already committed
cd <directory of your project>
git init
git add .
git commit -m "type in a commit message here"
Pushing to your remote project on github.com
git remote add origin https://github.com/AccountName/testProject.git
git push -u origin master
It'll prompt you to enter Username & Password but password should be your token already created on github prior and NOT your account password
Username for 'https://github.com': <your username here>
Password for '<your username is shown here>': <access token here>

Please make sure you have the correct access right and the repository exists github

When I try to push my changes to my github repo I am receiving the error:
Fatal: 'git#github.comRedHoodJT1988/hello_app.git' does not appear to be a git repository
Fatal: could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
I have looked at the documentation and completed the steps here:https://help.github.com/articles/error-permission-denied-publickey/
As well as looked at other sites and nothing is working. I am able to connect to ssh because I receive the message :Hi RedHoodJT1988...
I am at a loss for what to do next. I am not using a cloud IDE I am on a macbook pro if that helps. Also, not sure if it matters, I am developing a Ruby on Rails application.
You're missing a colon in your address and need to change your remote named origin
git remote remove origin
git remote add origin https://github.com/RedHoodJT1988/hello_app.git
Since it is an SSH URL, there should not be any https involved:
git remote set-url origin git#github.com:RedHoodJT1988/hello_app.git

SourceTree github repo not valid url

When I install SourceTree on my OSX, setup a Github account via ssh, and then copy/paste Github url/clone, It always says "Not a valid sourcepath/URL" even though the url is valid.
I have searched the web for the same issues, and found some interesting solutions, but non of them worked in my case. I have tried removing all of SourceTree's settings and completely uninstall the APP, but same stuff is happening. Also tried removing my account, removing ssh key etc. (I have git installed).
All of my connected repositories is shown under the tab remote, but I just can't clone anything.
The Github repo url is: https://github.com/myacc/teststuff.git
Any ideas what might be wrong? :/
First, if you are talking about ssh keys, the url to use should be an ssh one:
git#github.com:myacc/teststuff.git
Second, since I don't see that repo on your account, it could be a private repo.
Make sure yu have enabled Git on SourceTree (I prefer using the system Git, meaning a Git I have installed myself)

Can't push to git hub

I just completed Chapter One of the Ruby on Rails Tutorial by Hartl. Posted about one minor hitch previously. Now I started Chapter Two. I swear I did everything by the book, but now when I try:
git push -u origin master
I get the following messages after entering my passphrase:
ERROR: repository not found
fatal: could not read from remote repository
Please make sure you have the correct access rights and that the repository exists.
When I down loaded heroku tools I think it installed a second version of Ruby on my machine. In any case I now have two version listed under All Programs. Could this have screwed thing up? The two versions are Ruby 1.9.2-p290 and 1.9.3-p327. Also when I open the command prompt using 1.9.2 there is a weird thing at the top before I do anything:
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
This is then followed by the normal prompt on the next line. I'm wondering if the use of my public keys have some how gotten screwed up.
Any help would be appreciated.
You should add a new git remote.
check https://help.github.com/articles/adding-a-remote
So i had problems with windows and multiple versions of ruby too. I would recommend deinstalling all versions and only installing one ruby version. But thats not related to your Github problem i guess.
Switch via the commandline to your app folder and checkout:
git remote -v
it shows you what is the remote location for you app. And 5 bucks that its screwd up. You can remove the path by:
git remote rm origin
or if its only on heroku:
git remote rm heroku
and after that add the correct remote path again. Example:
git remote add origin git#github.com:foo/bar.git
That hopefuly fix it.
And keep in mind if you want to push to heroku use:
git push heroku master

Cannot commit - messed up my sourceCode control, how to fix it?

Hello fellow programmers,
I accidentally added my whole project to my project, not once, but twice, as I was looking for another functionality. Since the folders didn't show up in Xcode itself, I went to Finder and deleted them manually from the filesystem again (so far so good, since I got all warning 4x).
But now, when I want to commit changes to the sourceCode control, I get this error:
fatal: Could not switch to '/Users/myID/Developer/iOS/ProjectName/ProjectName/ProjectName': No such file or directory
I have pretty much no clue what to do, has anyone ever had such a problem? Cleaning the project does not help, that's all I could think off, as I'm not that experienced!
Help I HIGHLY appreciated!
PS: I'm running Xcode 4.3.2 on OSX 10.7.4
For something as serious as this I would create a new git repo, starting from the commit revision before the screw-up.
Assume your code is in ~/Source/MyProject.
First you are going to need the commit revision before the screw-up. You can get his from the command line using git log or better still you can use the excellent (and free) SourceTree Mac App. Lets assume it's 62a6614fb55d692cd5a6e251cc05dea45d9668fe.
Next start a new repo: $ mkdir ~/Source/MyProjectNew; cd ~/Source/MyProject/New; git init.
Add the old project as the 'remote origin' of the new project: $ git remote add origin ~/Source/MyProject.
Fetch the pre-screwed code: $ git fetch origin 62a6614fb55d692cd5a6e251cc05dea45d9668fe.
Reset the master branch to the pre-screwed commit: $ git reset --hard FETCH_HEAD.
Remove the origin: $ git remote rm origin.
You now have a new repo without the screwed-up code. You need to rename the old and new repo and carry on with your life.

Resources