git lfs: upload over 8G files, it stuck at 8.1G - gerrit

i build gerrit server using apache2.
i has 'git push' other lfs files successfully, now i want to upload over 8.1Gb lfs files,but it stuck at 8.1Gb, no return and no error.
android#gerrit-server:~/work/project$ git push http://username#gerrit-server:8888/vendor/qcom/boot_images HEAD:refs/heads/releases-branch**
Locking support detected on remote "http://username#gerrit-server:8888/vendor/qcom/boot_images". Consider enabling it with: $ git config lfs.http://gerrit-server:8888/vendor/qcom/boot_images.git/info/lfs.locksverify true Uploading LFS objects: 98% (9892/10045), 8.1 GB | 0 B/s
Just like that, it always stuck that

Related

How to run git clone command in a pipeline step LFS enabled

I've a pipeline that is cloning another repository. Pipeline below is running on yyy repository, and it's supposed to clone xxx repository and do some work on it, then upload the results to AWS S3, I have lots of object to be worked on, so git clone step should be LFS enabled. git lfs client is configured on my base image. LFS is also enabled on my xxx repository. My deployment consumes so much time to clone repo with LFS enabled.
- step:
name: "Pipeline"
services:
- docker
caches:
- docker
script:
- ...
- ...
- ...
- ...
- git clone git#bitbucket.org:xxx.git
I've tried
clone:
lfs: true
option to reduce the consumed time but it seems it doesn't work with the setup above.
How can I reduce time consumption for this setup? Is there any workaround here?
Thank you.
It can be a little bit weird but I came up with the solution below,
I gave
clone:
enabled: false
in the pipeline, and I cloned the repo in the script part. Because my repo is huge, I limited everything to consume less time.
git clone git#bitbucket.org:xxx/<repo-name>.git --depth 1 --no-tags --single-branch -b <branch> --no-checkout .
It's working like a charm :)

Is checkout necessary to work on branch

I have created a repository in Bitbucket and have added some code in the master branch. Then I created a branch dev and I intend to work on dev branch and sync it with master when required.
To work on dev, do I need to run git fetch && git checkout dev or could I simply change my local code (eg change a file or add a file) and push it on dev using following commands?
git remote add origin https://username#your.bitbucket.domain:7999/yourproject/repo.git
git push -u origin dev
I am sceptical trying this without guidance as I have faced issues where the branches are no longer in sync!
I suppose it is. When I create a branch in Bitbucket, the branch gets created there but not in my local machine. The local machine still has only master branch. the commands git fetch && git checkout dev run on local machine (in project directory) creates dev branch in local machine.
C:\...\dw-ng2-app>git fetch && git checkout dev
From ssh://bitbucket.org/ManuChadha/angularcli
* [new branch] dev -> origin/dev
Switched to a new branch 'dev'
Branch dev set up to track remote branch dev from origin.
Any changes I'll do now in local machine will be in dev and will be pushed to dev in Bitbucket.
So following commands are now applied to local dev and dev on bit bucket
C:\...\dw-ng2-app>git add --all
warning: LF will be replaced by CRLF in src/app/app.component.html.
The file will have its original line endings in your working directory.
C:\...\dw-ng2-app>git commit -m "added names"
[dev d3749c7] added names
1 file changed, 4 insertions(+)
C:\...\dw-ng2-app>git push origin dev
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 482 bytes | 0 bytes/s, done.
Total 5 (delta 4), reused 0 (delta 0)
remote:
remote: Create pull request for dev:
remote: https://bitbucket.org/ManuChadha/angularcli/pull-requests/new?source=dev&t=1
remote:
To ssh://bitbucket.org/ManuChadha/angularcli.git
cddddca..d3749c7 dev -> dev

Error when deploying Lektor site to Github Pages using Travis CI

I've got a Lektor site that I'm trying to deploy automatically in response to pull requests and commits, using the Travis CI trigger approach from the Lektor docs.
The Lektor configuration works fine from the command line.
The Travis build starts, and appears to build the site without problem - but when it gets to deployment, the log says the following:
Installing deploy dependencies
!!! Script support is experimental !!!
Preparing deploy
Cleaning up git repository with `git stash --all`. If you need build artifacts for deployment, set `deploy.skip_cleanup: true`. See https://docs.travis-ci.com/user/deployment/#Uploading-Files.
No local changes to save
Deploying application
Deploying to ghpages-https
Build cache: /home/travis/.cache/lektor/builds/d3a411e13041731555222b901cff4248
Target: ghpages+https://pybee/pybee.github.io?cname=pybee.org
Initialized empty Git repository in /home/travis/build/pybee/pybee.github.io/temp/.deploytemp9xhRDc/scratch/.git/
Fetching origin
fatal: repository 'https://github.com/pybee/pybee.github.io/' not found
error: Could not fetch origin
fatal: repository 'https://github.com/pybee/pybee.github.io/' not found
Done!
For a full log, see here.
I've checked the credentials in the Travis CI configuration for the repository; I'm as certain as I can be that they're correct. I've tried using the same configuration (exporting LEKTOR_DEPLOY_USERNAME and LEKTOR_DEPLOY_PASSWORD locally), and it works fine.
hammer:pybee.org rkm$ lektor deploy ghpages-https
Deploying to ghpages-https
Build cache: /Users/rkm/Library/Caches/Lektor/builds/a269cf944d4302f15f78a1dfb1602486
Target: ghpages+https://pybee/pybee.github.io?cname=pybee.org
Initialized empty Git repository in /Users/rkm/projects/beeware/pybee.org/temp/.deploytempOh4p98/scratch/.git/
Fetching origin
From https://github.com/pybee/pybee.github.io
* [new branch] master -> origin/master
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
Everything up-to-date
Done!
Any suggestions on the cause of this error?
It turns out this is a bug in Lektor.
If you use the following in your <project>.lektorproject:
[servers.ghpages-https]
target = ghpages+https://pybee/pybee.github.io?cname=pybee.org
and the following in your .travis.yml:
language: python
python: 2.7
cache:
directories:
- $HOME/.cache/pip
- $HOME/.cache/lektor/builds
install: "pip install git+https://github.com/singingwolfboy/lektor.git#fix-ghpages-https-deploy#egg=lektor"
script: "lektor build"
deploy:
provider: script
script: "lektor deploy ghpages-https"
on:
branch: lektor
(i.e., use the PR branch for deployment), builds will deploy as expected.

Correct way of committing changes to master branch on Github

So I am very new to Github. Please forgive me if i am asking a stupid question. So first did some reading on Github and tried to understand the philosophy about it. So i am working on my first ruby on rails app (very excited) I generated my new app and made my first commit by pushing the empty app to Github. So now i have a master branch.
Then i created a couple of models and added some fields to the tables i made. Now i would like to push this change on Github . What do i do and how? I KNOW some of you will say why would you push a change so small but i am just trying to learn GIT so then when i work on huge projects i am ready.
I basically want to commit the changes to the masters . How do i do this? I USUALLY see other peoples gits and they have messages like "fixed feature 1" 1 hour ago etc. So i want to do the same.
Please advice.
You would do that just like you pushed your earlier code - by pushing the commits you have made to remote repository.
If you are on the master branch, this will do: git push origin master (replace origin with your remote name - git remote -v will tell you all your remote names).
If you are on a feature branch, you can checkout to the master branch and then merge your feature branch - git checkout master and then git merge <feature branch>, and then push your changes again using git push origin master.
EDIT:
You can add a shortname using git remote add origin <link to remote repository>, and then use origin to push.
I am new to git as well and the answer above sounds better then mine. I have bash script on github (https://github.com/caroldomokos/columbo) which is work in progress for some time. I have the master locally as you do. When I make a change on the script I first do "git commit -a" and then "git push". I am in the "columbo" forlder on my pc. If you add a new file you first have to tell git to add it: "git add ". You can always use "git status" to see what is tracked and what has changed.To examplify I created this small sequence for you :-)
hpbcadom#LUBUNTU32:~/columbo$ echo "Git example" > example_file
hpbcadom#LUBUNTU32:~/columbo$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
(use "git add ..." to include in what will be committed)
example_file
nothing added to commit but untracked files present (use "git add" to track)
hpbcadom#LUBUNTU32:~/columbo$ git commit -a
[master d799b3a] to help I hope
1 file changed, 1 insertion(+)
create mode 100644 example_file
hpbcadom#LUBUNTU32:~/columbo$ git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.
In Git 2.0, Git will default to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
Username for 'xxxs://github.com': caroldomokos
Password for 'xxxs://caroldomokos#github.com':
Counting objects: 4, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 288 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
To xxxs://github.com/caroldomokos/columbo
dadf5af..d799b3a master -> master
I hope it helps :-)

Travis CI shows "Host key verification failed." when I try to clone submodule from Bitbucket

I have repositories A, B, C and D. A, B and C run on Travis CI. All repositories are located on Github except for D which is located on Bitbucket. D is a sub repository in C. C is a sub repository in A and B. A and B run fine on Travis CI. C however fails. See the output below when Travis CI runs C.
.travis.yml specifies build on branch master for all repositories.
I'm not sure what else to try here. It looks like a simple (and I hope it is) SSH authorization denied, but I've verified the public key on Bitbucket as well as the private key on Travis and it matches the keys of A and B (that are running just fine).
What is the problem here?
Using worker: worker-mac-1.saucelabs.travis-ci.com:travis-mac_osx-19
Installing an SSH key from: repository settings
Key fingerprint: <fingerprint>
$ git clone --depth=50 --branch=master git#github.com:path/to/repo/D.git path/to/repo/D
Cloning into 'path/to/repo/D'...
Warning: Permanently added 'github.com,192.30.252.129' (RSA) to the list of known hosts.
remote: Counting objects: 2005, done.
remote: Compressing objects: 100% (1317/1317), done.
remote: Total 2005 (delta 555), reused 1587 (delta 486)
Receiving objects: 100% (2005/2005), 12.95 MiB | 4.64 MiB/s, done.
Resolving deltas: 100% (555/555), done.
Checking connectivity... done.
$ cd path/to/repo/C
$ git checkout -qf <SHA-1>
$ git submodule init
Submodule 'path/to/repo/D' (git#bitbucket.org:path/to/repo/D.git) registered for path 'path/to/repo/D'
$ git submodule update
Cloning into 'path/to/repo/D'...
ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Clone of 'git#bitbucket.org:path/to/repo/D.git' into submodule path 'path/to/repo/D' failed
It's likely that the host key required for BitBucket isn't available on our build machine, hence the failing host verification.
We can investigate that, but I'd recommend in the meantime to put the required dependency on GitHub to fix this issue, if that's possible.

Resources