Press ESC to close

Github Large File Storage

Hello friends, in this article, we will talk about the solution of a problem experienced while assigning the projects we created to Github.

In the projects we develop, sometimes it is necessary to add the files with high size to the source code and submit them to Github. In cases where we do not throw, other teammates may get errors or may not get builds when we use CI/CD. This can cause a lot of trouble.

If I go through my own scenario, some files in the RealmSwift pod I added were over 100mb. While trying to submit them to Github, I got the following error;

“this exceeds GitHub’s file size limit of 100.00 MB”

After getting this error I saw it was Github File Storage. With this system, we can send files over 100mb to Github. For this, we need to install git-lfs in our local. For this, you can run the following command line from the terminal.

brew install git-lfs

More information on git-lfs can be found here.

Then we need to come to the source code of our project and activate Large File Storage. For this, we need to specify which of our files will be included in this system. In my scenario several a files were high in size and I needed to upload them. That’s why I included all the files with the extension a in this system. After including it Github asks for user information. You must enter a username and password. When you enter your Github password, you will probably get an error like the one below.

‘remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

This is because Github now requires personal access tokens. When you go to the settings page on Github, you must create a token in the Personal Access Token section of the Developer Settings section and enter this generated token in the password field in the terminal.

 

After these operations, you can push your commit again. The problem will be solved.

Again, if there is any problem, you can reach us by sending an e-mail or comment. You can find more articles here. Good work.

Comments (1)

Leave a Reply

Your email address will not be published. Required fields are marked *