It should be noted that the created GitHub submodules are treated as separate, independent repositories. To prove this point, a file named tugboat.html is added to the surface module and a file named xia.html is added to the added GitHub submodule. Note that a push from each repository is required to move changed files back to the GitHub server. A push from the parent does not automatically force new commits in the submodule to be pushed as well.

Both the project and the submodules are in a private repository so you would expect to be prompted for authentication, but as I've mentioned, the project and the submodule are under the same account and one of the runner's jobs is to clone the original repository


Gitlab Download Zip With Submodules


Download 🔥 https://urllio.com/2y3IA7 🔥



First of all I find this strange especially in an environment where a lot of things are shared (team) and second of all it binds the whole procedure to a specific user. If that user disappears (e.g. layoff or whatever), another user with their PAT will have to take over and so on. I would hope that a CI_JOB_TOKEN can be used here instead?

Git addresses this issue using submodules.Submodules allow you to keep a Git repository as a subdirectory of another Git repository.This lets you clone another repository into your project and keep your commits separate.

Since the URL in the .gitmodules file is what other people will first try to clone/fetch from, make sure to use a URL that they can access if possible.For example, if you use a different URL to push to than others would to pull from, use the one that others have access to.You can overwrite this value locally with git config submodule.DbConnector.url PRIVATE_URL for your own use.When applicable, a relative URL can be helpful.

There is another way to do this which is a little simpler, however.If you pass --recurse-submodules to the git clone command, it will automatically initialize and update each submodule in the repository, including nested submodules if any of the submodules in the repository have submodules themselves.

If you already cloned the project and forgot --recurse-submodules, you can combine the git submodule init and git submodule update steps by running git submodule update --init.To also initialize, fetch and checkout any nested submodules, you can use the foolproof git submodule update --init --recursive.

There is an easier way to do this as well, if you prefer to not manually fetch and merge in the subdirectory.If you run git submodule update --remote, Git will go into your submodules and fetch and update for you.

Git will by default try to update all of your submodules when you run git submodule update --remote.If you have a lot of them, you may want to pass the name of just the submodule you want to try to update.

Note that to be on the safe side, you should run git submodule update with the --init flag in case the MainProject commits you just pulled added new submodules, and with the --recursive flag if any submodules have nested submodules.

If you want to automate this process, you can add the --recurse-submodules flag to the git pull command (since Git 2.14).This will make Git run git submodule update right after the pull, putting the submodules in the correct state.Moreover, if you want to make Git always pull with --recurse-submodules, you can set the configuration option submodule.recurse to true (this works for git pull since Git 2.15).This option will make Git use the --recurse-submodules flag for all commands that support it (except clone).

There is a special situation that can happen when pulling superproject updates: it could be that the upstream repository has changed the URL of the submodule in the .gitmodules file in one of the commits you pull.This can happen for example if the submodule project changes its hosting platform.In that case, it is possible for git pull --recurse-submodules, or git submodule update, to fail if the superproject references a submodule commit that is not found in the submodule remote locally configured in your repository.In order to remedy this situation, the git submodule sync command is required:

If we commit in the main project and push it up without pushing the submodule changes up as well, other people who try to check out our changes are going to be in trouble since they will have no way to get the submodule changes that are depended on.Those changes will only exist on our local copy.

For instance, switching branches with submodules in them can also be tricky with Git versions older than Git 2.13.If you create a new branch, add a submodule there, and then switch back to a branch without that submodule, you still have the submodule directory as an untracked directory:

Newer Git versions (Git >= 2.13) simplify all this by adding the --recurse-submodules flag to the git checkout command, which takes care of placing the submodules in the right state for the branch we are switching to.

Luckily, you can tell Git (>=2.14) to always use the --recurse-submodules flag by setting the configuration option submodule.recurse: git config submodule.recurse true.As noted above, this will also make Git recurse into submodules for every command that has a --recurse-submodules option (except git clone).

Then, when you switch back, you get an empty CryptoLibrary directory for some reason and git submodule update may not fix it either.You may need to go into your submodule directory and run a git checkout . to get all your files back.You could run this in a submodule foreach script to run it for multiple submodules.

I tried with absolute and relative paths, and different accounts (owner or maintainer). In the end, my only possibility was to disable the Allow access to this project with a CI_JOB_TOKEN parameter.

I have the same problem with @micazeve .

I have a main repo called main_repo this repo includes a submodule called sub_repo inside the main directory. I go to the sub_repo>settings>CICD>token access

Then I enter the link ip_address/project/main_repo/git_cicd_example and see the same error:

I have a private group with several projects and one of them (called A in next sentences) use the others as submodules. Everything was working well since, one or 2 weeks ago, I created a new project that I wanted to add as submodule to project A. Do not know why but, it does not work and I have the exact same logging report in the CI Jobs console as @Julien2313.

I am sure that I followed the exact same steps to create the new git project as the olders.

The concept of submodules is brilliant. It essentially allows you to attach an external repository inside another repository at a specific path. In order to illustrate the value of submodules, it will probably be helpful for me to explain how I am using them.

My profession is working with WordPress themes. Basically, I develop feature enhancements to the themes. I develop the code for these enhancements in modules that are completely contained in their own folder. This allows for the code to be easily added to other themes and also simplifies code updates/improvements as the code for specific features is consistent across all the themes that use that specific module.

The main reason that I wrote this is that I have submodules that also have submodules. Remembering which submodules I had to switch to to do subsequent inits and updates on was a pain, so I wrote this to handle it all for me. It works well for non-nested submodules as well.

In the system I built to manage packaging of theme and plugin zips from the repos, I have some automated code that manages getting the appropriate submodule commits before packaging the files. Whenever I push up a new tag for a repo, all repos that use it as a submodule will automatically be updated to use the new commit, these individual repos will have their history files and version numbers updated, and then the repo updates will be committed and pushed along with a new tag (possibly setting off another run of updates).

So, using the submodule init/update system as-is on all development platforms ensures that the repos that we pull down will match what is available to our customers/users (short of any untagged changes in the parent). It also prevents anyone from accidentally committing untagged commits for the submodules to parent repos, which I can see happening easily in your setup.

You can then use whatever workflow you want when working with that remote repository. You can do pulls against the original source, merge as desired, and do your updates as desired. After committing these changes, you can then pull down the changes to your repository/repositories that use this repo as a submodule.

Fortunately, submodules work very well for me. There are a few rough edges that I think could be smoothed out (such as providing a command-driven approach to removing submodules), but overall, they do exactly what I need. Knowing this other approach is good to have in the back of my head though. Thanks for sharing it.

I believe that the free flow of information and ideas is key to the past and future development of mankind. Unless the content declares otherwise, the post content on this site is declared public domain (CC0 1.0 Universal) and can be used in any manner with or without attribution or permission. Of course, if you wish to give attribution back to me, that would be very nice. :)

I'm facing some headache trying to implement a multi-pipeline multi-git workflow for my production/developpment. I'm building 5 images, each with a different dockerfile but with a common ci pipeline + a common set of home crafted tools in another repo. Here is a the architecture:

Next, if you are using gitlab-ci-multi-runner v1.10+, you can set the GIT_SUBMODULE_STRATEGY variable to either normal or recursive to tell the runner to fetch your submodules before the job: yaml variables: GIT_SUBMODULE_STRATEGY: recursive See the .gitlab-ci.yml reference for more details about GIT_SUBMODULE_STRATEGY.

The rationale to set the sync and update in before_script is because of the way Git submodules work. On a fresh Runner workspace, Git will set the submodule URL including the token in .git/config (or .git/modules//config) based on .gitmodules and the current remote URL. On subsequent jobs on the same Runner, .git/config is cached and already contains a full URL for the submodule, corresponding to the previous job, and to a token from a previous job. sync allows to force updating the full URL. 2351a5e196

mp3 song download selfie

download dj bebek care

sticky notes download for windows xp

download eml viewer

seafile android download location