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

Viewed 3411

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:

enter image description here

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.

3 Answers

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 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>

I had same issue cause of selecting different origin, select default origin and Source Control > Push and select Origin in dropdown then push

Related