How to get dependencies which are not on github through Carthage? - ios

I am trying to use only carthage for dependency manager. But what happens if the project is not available on github? What is work through for that?
Thanks

Using an example on Bitbucket you can do the following:
Setup SSH keys for the acct
use the direct ssh sync
git "git#bitbucket.org:{acct}/{repo}.git"
In general that line can be used for any repo.
git "http://git.mypersonalserver.net/mySource/myrepo.git"

Related

How to configure rebar3 to fetch dependencies from another host?

I have an app which uses rebar3, eg cowboy. My question is: how can I easily configure it to fetch cowboy from another host? That is I want to point it from github to another host.
You want to build cowboy that has two dependencies which are git repositories on GitHub (https://github.com/ninenines/cowlib and https://github.com/ninenines/ranch to be specific). But you want to fetch the repositories from some other host, like your company's own git server where you mirrored all public repositories you need.
You have a number of options:
Fork cowboy and change the dependency URL-s in the rebar.config. This is the only (sane) way I know to make Rebar3 fetch the dependencies from a different location. The other options will target the layers below Rebar3 to achieve the same result.
Configure git to rewrite GitHub URL-s to URL-s on your server, following e.g. https://stackoverflow.com/a/11383587/9015322
git config --global url.https://git.mycompany.com/.insteadOf https://github.com/
Add an /etc/hosts entry that resolves github.com to the IP of your server. You'll probably have to create a fake self-signed certificate for github.com, and make git on the build machine trust it. But you can do that following the advice here: https://stackoverflow.com/a/16543283/9015322
By default, rebar3 will only grab packages from either hex.pm, any git repository, or any mercurial repository. You can see your options here.
If these defaults are not enough for you, you can create your own dependency resources. This will require you to write some Erlang code in order to tell rebar3 how to find and download the package(s) you are trying to use.

How to migrate application source code from SVN to AWS CodeCommit

I want to migrate iOS application source code from SVN to AWS CodeCommit.
I checked everywhere but haven't got proper information. Somewhere I got know that first need to migrate source code from SVN to GIT and then can able to migrate it on AWS Code Commit from GIT.
Need to confirm that is it correct information.
I just did it for my project via these steps.
Migrate project from svn to git using svn2git
Create an online project in a git repository for temporarily storing the project before moving to CodeCommit. I used gitlab.
Push the git project to the online repo
git remote add origin git#gitlab.com:corridor/project_name.git
git push origin --mirror
Follow https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-migrate-repository-existing.html to migrate git project from gitlab to CodeCommit
That is correct. AWS CodeCommit stores private Git repositories, and does not support SVN natively. Once you have a Git repository, you should be able to push to CodeCommit.
Also, maybe this doc can help you with the migration: https://git-scm.com/book/en/v2/Git-and-Other-Systems-Migrating-to-Git

Creating private cocoapods repo outside github

We are working on projects which use both open-source libraries and our private libraries which can't go public. By public I mean, that they can't be hosted outside our company servers. We would like to use CocoaPods for all of them. While using open-source libs is pretty easy, my question is if I can use private repository on our private servers to host our private libs? I've found this link http://guides.cocoapods.org/making/private-cocoapods.html, and there is no information weather it has to be github or it can be any server, however I was also looking for solution on other pages and everybody say that I has to be repo on github. Is it true?
It does not have to be a repo on GitHub. See the private pods guide for more info.
Just add a new local repo and configure the remote as needed:
mkdir ~/.cocoapods/repos/private
cd ~/.cocoapods/repos/private
git init
git commit -m Initial
git remote add origin https://myremote.org
git push -u origin master
Yeah, you can use any git repo you want.
I always follow this tutorial when create private cocoa pods.
https://coderwall.com/p/7ucsva
it's simple
write the following lines
mkdir ~/<path x>
cd <path x>
git init
pod repo add <name of your repo> ~/<path x>

Jenkins with Git and XCode: cannot pull sub-sub-module?

I use Jenkins for CI, and git for XCode project, I have the XCode integration plugin and Git plugin installed, one of the submodules in my project has a sub-submodule, but Jenkins cannot pull it although it is said to be able to do that.
Does anyone have the same issue and any solution to this? I guess I have to add another execution step that pull all the sub-submodules?
Thanks!
We have submodules and it seems to work well, but we had a project break on Thursday for reasons unknown, on a submodule so there must be some situations where the submodule makes it barf. If I find out more, I'll post it here.

Whats the best way to work with Github and multiple computers?

I am developing some school grading software and decided to use Github to host the project. After building some code on my Ubuntu box I pushed it to Github and then cloned it down to my MacBook Pro. After editing the code on the MBP I pushed it back to Github. The next morning I tried to update my repo on the Ubuntu box with a git pull and it gave me all kinds of trouble.
Whats the best way to work in this situation? I don't want to fork my own repo and I don't really want to send myself emails or pull requests. Why can't I just treat Github like a master and push/pull from it onto all of my personal repos on different computers?
I'll assume your problem was that the machine on which you first created the repo crapped out when you tried to issue the git pull command.
When you clone an existing git repository (like you did on your 2nd machine, the MacBook Pro), you're automatically set up to so your git pull commands will automatically merge the remote with your local changes.
However, when you initially create a repo and then share it on a remote repository, you have to issue a few commands to make things as automated as a on cloned repo.
# GitHub gives you that instruction, you've already done that
# git remote add origin git#github.com:user_name/repo_name.git
# GitHub doesn't specify the following instructions
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
These last few instructions configure git so future git pull's from this repo will merge all remote changes automatically.
The following is a bit of shameless self-promotion. If you use Ruby, I have created a Ruby-based tool that lets you deal with all these kinds of things with git remote branches. The tool is called, unsurprisingly, git_remote_branch :-)
If you don't use Ruby, my tool is probably gonna be too much of a hassle to install. What you can do is look at an old post on my blog, where most of the stuff grb can do for you was explicitly shown. Whip out your git notes file :-)
You can also add multiple SSH public keys.

Resources