I have a server with two git repos on (affinage.git and avondalelibs.git) They contain code built using cmake and make.
I have access on my machine to the server using ssh - the keys are good.
The repo 'affinage' uses 'avondalelibs' as a submodule.
When I clone affinage natively (i.e. not using yocto) the following happens:
chrisbrown#thebeast:/tmp$ git clone ssh://server#thebeast:/home/server/serverrepo/affinage.git
Cloning into 'affinage'...
remote: Enumerating objects: 307, done.
remote: Counting objects: 100% (307/307), done.
remote: Compressing objects: 100% (296/296), done.
remote: Total 307 (delta 158), reused 0 (delta 0)
Receiving objects: 100% (307/307), 2.10 MiB | 7.04 MiB/s, done.
Resolving deltas: 100% (158/158), done.
chrisbrown#thebeast:/tmp$ cd affinage/
chrisbrown#thebeast:/tmp/affinage$ git submodule update --init --recursive
Submodule 'avondalelibs' (ssh://server#thebeast/home/server/serverrepo/avondalelibs.git) registered for path 'avondalelibs'
Cloning into '/tmp/affinage/avondalelibs'...
Submodule path 'avondalelibs': checked out '52d2adc212700056c4b3c9c672702da33073f86a'
Which is good.
When I use Yocto (dunfell) to build the same repo it fails:
Log data follows:
| DEBUG: Executing shell function do_configure
| Submodule 'avondalelibs' (ssh://server#thebeast/home/server/serverrepo/avondalelibs.git) registered for path 'avondalelibs'
| Cloning into '/home/chrisbrown/affinage/poky/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/affinage/1.0-r0/git/avondalelibs'...
| Permission denied, please try again.
| Permission denied, please try again.
| server#thebeast: Permission denied (publickey,password).
| fatal: Could not read from remote repository.
Yocto succeeds in cloning the top repo but fails in initialising the submodules. I am initialising them with a do_configure_prepend() as below:
do_configure_prepend() {
cd ${WORKDIR}/git
git submodule update --init --recursive
}
I can't understand why if both repos are from the same server with the same keys there is a 'permission denied'. Anyone know why this might happen?
Related
I am new to gitlab-ci and I am trying to test my build phase but it keeps failing before last step. here is the section
build:
stage: build
before_script:
- git config user.name "$GITLAB_USER_NAME"
- git config user.email "$GITLAB_USER_EMAIL"
script:
- git add .
- git commit -m "[skip ci] migrations"
- git push "https://${GITLAB_USER_NAME}:${CI_GIT_TOKEN}#${CI_REPOSITORY_URL}" "HEAD:qa" -o ci.skip
dependencies:
- migrations
only:
- qa
This is the log, last few lines
Using docker image sha256:5b3b4504ff1f7b859dbc5d7fb86f4afc644be62f99b8ced636fbca64c8a6c2de for python:latest with digest python#sha256:73cc381fa0fe5e6d5dd38f1397da28c70096519d8818c2249f2bc8e1158ba015 ...
$ git config user.name "$GITLAB_USER_NAME"
$ git config user.email "$GITLAB_USER_EMAIL"
$ git add .
$ git commit -m "[skip ci] migrations"
HEAD detached at bf2a8e4
nothing to commit, working tree clean
Cleaning up file based variables
00:01
ERROR: Job failed: exit code 1
How can I find out what ERROR: Job failed: exit code 1 is? I am using shared runners
The error ERROR: Job failed: exit code 1 is coming from git not finding anything to commit. In other words, the below message is causing the error:
nothing to commit, working tree clean
Cleaning up file based variables
You can either may sure there is something to commit, or you can adjust your script as outlined in this related thread: How to git commit nothing without an error?
I have worked with git submodules in the past. I know the basic functionality.
If I simply used git submodule add <repo-url> <path/to/submodule>, the .gitmodules file would have :
[submodule "path/to/submodule"]
path = path/to/submodule
url = <repo-url>.git
Recently, I had to add a new git submodule to a repository that I was working on. I also found the fancy --name flag that can be used with the git submodule add command, from the man page of git submodule. The add worked fine and my .gitmodules had :
[submodule "<submodule-name>"]
path = path/to/submodule
url = <repo-url>.git
The issue happens when I'm attempting to update the submodule from the remote :
$ git submodule update --remote
fatal: no submodule mapping found in .gitmodules for path 'path/to/submodule'
OK, I can read the log, so I provide the path/to/submodule next :
$ git submodule update --remote path/to/submodule
Submodule path 'path/to/submodule' not initialized
Maybe you want to use 'update --init'?
OK, if you say so ( though I'm sure that the submodule has been properly initialized before already ). Now :
$ git submodule update --init --remote path/to/submodule
fatal: No url found for submodule path 'path/to/submodule' in .gitmodules
I did some experiments on a test repository and found that this happens only when the submodule is 'named'.
Am I doing something wrong with the name thing of the submodule? According to the man page, the --name flag is only applicable for the add sub-command and it does not work with update.
How do I update such named submodules?
Hi I am getting fatal: reference is not a tree: 947a3c67349eb242a8d46d576e544f8129b28cbf
Unable to checkout '947a3c67349eb242a8d46d576e544f8129b28cbf' in submodule path 'modules/webform'
My work station is as follows:
[root]:
.gitmodules
/modules/webform
Inside .gitmodules I have:
[submodule "modules/webform"]
path = modules/webform
url = https://git.drupal.org/project/webform.git
I have gone into modules/webform and git pull I have also git submodule sync, which gives me Synchronizing submodule url for 'modules/webform'. I have even hard reset that directory. I was wondering if there is a way to delete that reference/reset to the newest version? when I git log it gives me that the reference is a bad object.
I had to update my git --version. I was on 1.7, the latest is 2.1 or something.
I'm on my Server via ssh and trying to install MariaDB plugin for Dokku:
root#CHF:/var/lib/dokku/plugins# sudo git clone https://github.com/krisrang/dokku-mariadb mariadb
Cloning into 'mariadb'...
remote: Counting objects: 68, done.
remote: Total 68 (delta 0), reused 0 (delta 0), pack-reused 68
Unpacking objects: 100% (68/68), done.
Checking connectivity... done.
root#CHF:/var/lib/dokku/plugins# sudo dokku plugins-install
2016/03/24 15:10:42 open /var/lib/dokku/plugins/available/mariadb/plugin.toml: no such file or directory
2016/03/24 15:10:42 open /var/lib/dokku/plugins/available/md-plugin/plugin.toml: no such file or directory
root#CHF:/var/lib/dokku/plugins#
What am I doing wrong here?
Its not installed, I can't create a database and tables..
I tried also this way:
sudo dokku plugin:install https://github.com/Kloadut/dokku-md-plugin
--name mariadb
Check the output of ls -lha /var/lib/dokku/plugins/enabled
There are two directories inside /var/lib/dokku/plugins/ : available and enabled.
"available" contains every plugin that was installed and not yet uninstalled;
"enabled" contains all plugins that are being used. Each plugin that is being used is actually just a "shortcut" pointing to a another directory.
Taken from here
If you see a plugin you deleted outside of dokku, remove it with rm -r /var/lib/dokku/plugins/available/pluginNameHere
Those two plugins are not compatible with the latest version of dokku.
I have a remote repository hosted in bitbucket, but when I want clone this repository to my pc
Bitbucket clones the master branch
I want clone another branch called static_pages_exercises hosted too in the same remote project. Is that possible.
Error:it clones the remote master branch no the remote static-pages-exercises branch
daniel:~/workspace$ mkdir sample_app
daniel:~/workspace$ git init .
Reinitialized existing Git repository in /home/fernando/workspace/.git/
fernando#fernando:~/workspace$ git clone git#bitbucket.org:ferbad1212/sample_app.git
Cloning into 'sample_app'...
remote: Counting objects: 139, done.
remote: Compressing objects: 100% (124/124), done.
remote: Total 139 (delta 42), reused 0 (delta 0)
Receiving objects: 100% (139/139), 23.05 KiB, done.
Resolving deltas: 100% (42/42), done
Try the below command
git clone --branch branchname cloneUrl
example
git clone --branch feature https://cloneurl