Deployment failed on codeship due to shallow clone - deployment

Codeship pulls a clone with a depth of 50 to speed up the build process. We had a pull request that was over 50 commits (uncommon but happens) and our deployment to catalyze failed with the following error:
Warning: Permanently added '<deployment host>
to the list of known hosts.
Counting objects: 6551, done.
Delta compression using up to 32 threads.
Compressing objects: 100% (2626/2626), done.
Writing objects: 100% (6551/6551), 23.57 MiB | 16.37 MiB/s, done.
Total 6551 (delta 3843), reused 6551 (delta 3843)
To <>.git
! [remote rejected] dev -> master (shallow update not allowed)
error: failed to push some refs to '<>.git'
After squashing a few commits we were able to deploy but we ran into an issue when we had a rather large PR that needed to be merged. To avoid the error
' ! [remote rejected] dev -> master (shallow update not allowed) '
We added the following script to our deployment pipeline and everything worked fine.
if [ -f ${HOME}/clone/.git/shallow ]; then git fetch --unshallow; fi

We added the following script to our deployment pipeline and everything worked fine.
if [ -f ${HOME}/clone/.git/shallow ]; then git fetch --unshallow; fi

Related

I am not able to push the code changes on github pages?

I have deployed the code once on github using github pages and now i have maked the changes in some of the code and now i am not able to push the code .I deleted the all branches and code on repo and did the process once again but still on live website i am not getting any changes .
PS D:\VJTI_Racing_Website_2.0\frontend> git add .
>> git commit -m "updated"
>> git push origin master
On branch gh-pages
nothing to commit, working tree clean
Enumerating objects: 26890, done.
Counting objects: 100% (26890/26890), done.
Delta compression using up to 8 threads
Compressing objects: 100% (21199/21199), done.
Writing objects: 100% (26890/26890), 779.96 MiB | 1.96 MiB/s, done.
Total 26890 (delta 4725), reused 26890 (delta 4725), pack-reused 0
remote: Resolving deltas: 100% (4725/4725), done.
remote: warning: File node_modules/.cache/default-development/3.pack is 52.95 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: error: Trace: d119776a9de8bb6b95dccf52e4031387455d238a7a7367d558a094750a2328de
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File node_modules/.cache/default-development/0.pack is 490.10 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
To https://github.com/vjtiracing/VJTI_Racing_Website_2.0.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/vjtiracing/VJTI_Racing_Website_2.0.git'
the error showing is of large file but I deleted the node modules file and also cleared the cache please someone help me out here.

i have pushed my website locally on github after creating an empty repository but the repository is still blank

I have a folder with codes, i pushed it on github after creating a repository but the process was successful but i can not see any file in the repository, any help guys, this is my cli codes
SydoTech#DESKTOP-PUHK97G MINGW64 /d/james/ict-specialists (master)
$ git remote add origin https://github.com/Kato669/ict-specialist-website.git
SydoTech#DESKTOP-PUHK97G MINGW64 /d/james/ict-specialists (master)
$ git push origin main
error: src refspec main does not match any
error: failed to push some refs to 'https://github.com/Kato669/ict-specialist-website.git'
SydoTech#DESKTOP-PUHK97G MINGW64 /d/james/ict-specialists (master)
$ git push origin master
Enumerating objects: 1383, done.
Counting objects: 100% (1383/1383), done.
Delta compression using up to 4 threads
Compressing objects: 100% (1380/1380), done.
error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8)
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (1383/1383), 35.93 MiB | 323.00 KiB/s, done.
Total 1383 (delta 181), reused 0 (delta 0), pack-reused 0
fatal: the remote end hung up unexpectedly
Everything up-to-date
SydoTech#DESKTOP-PUHK97G MINGW64 /d/james/ict-specialists (master)
$

Fatal errors on git push (no upstream branch, pack exceeds maximum allowed size,write error: Broken pipeB/s, )

I have an old repository on Github (the last commit was 2 years ago). Recently I worked with the local copy, and performed several commits, tried to push, it gave me the following error
$git push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master
I searched for a solution here , I tried $ git push --set-upstream origin masterthe following errors occurred:
Enumerating objects: 182, done.
Counting objects: 100% (182/182), done.
Delta compression using up to 8 threads
Compressing objects: 100% (110/110), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (166/166), 2.44 GiB | 599.00 KiB/s, done.
Total 166 (delta 61), reused 147 (delta 47), pack-reused 0
fatal: the remote end hung up unexpectedly
Everything up-to-date
I tried another solution from the same post $ git push -u origin head
it gives me some extra errors
git push -u origin master
Warning: Permanently added the RSA host key for IP address '140.82.112.4' to the list of known hosts.
Enumerating objects: 182, done.
Counting objects: 100% (182/182), done.
Delta compression using up to 8 threads
Compressing objects: 100% (110/110), done.
remote: fatal: pack exceeds maximum allowed size
fatal: sha1 file '<stdout>' write error: Broken pipeB/s
error: remote unpack failed: index-pack abnormal exit
To github.com:drnesr/PrayerTimesStudies.git
! [remote rejected] master -> master (failed)
error: failed to push some refs to 'github.com:AcountName/RepoName.git'
How can I solve this push to GitHub problem?

Cannot deploy sample GOLang application to Heroku

I tried deploying the sample GO application to Heroku listed here
But when I run the command:
git push heroku master
I get the following error:
Counting objects: 28, done.
Compressing objects: 100% (21/21), done. Writing objects: 100%
(28/28), 3.08 KiB, done. Total 28 (delta 6), reused 0 (delta 0)
! Heroku push rejected, no Cedar-supported app detected
To git#heroku.com:mysterious-refuge-1227.git ! [remote rejected]
master -> master (pre-receive hook declined) error: failed to push
some refs to 'git#heroku.com:mysterious-refuge-1227.git'
The sample code might be out-of-date so I created a simple hello world GO App but from the same git push command I got the following error:
Counting objects: 10, done.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (10/10), 1.16 MiB | 690 KiB/s, done.
Total 10 (delta 1), reused 0 (delta 0)
-----> Fetching custom git buildpack... done
-----> Go app detected
-----> Installing Go 1.1... done
Installing Virtualenv... done
Installing Mercurial... done
Installing Bazaar... done
-----> Running: go get -tags heroku ./...
package echo/...: unrecognized import path "echo/..."
! Heroku push rejected, failed to compile Go app
To git#heroku.com:evening-reef-1503.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:evening-reef-1503.git'
Any ideas on how I can resolve this issue?
Here is my system info:
GoLang version: go version go1.1 linux/386
Kubuntu version: 12.10
I suspect your original error is because you created the application with heroku create. You're using Go, which is supported through a buildpack, so you should create the application with something like heroku create -b https://github.com/kr/heroku-buildpack-go.git. I believe the demo app makes the same mistake - my fork fixes it - and I've submitted a pull request too.

xcdatamodel history causing git push errors

I have enabled history for xcdatamodel file.From the xcode it appears to be one file
from terminal its a set of folders
my.xcdatamodeld/
my 2.xcdatamodel
my.xcdatamodel
I am unable to deliver this to my remote git repository due to this error
indmacsunelama$ git push
Counting objects: 19, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (13/13), done.
Writing objects: 100% (14/14), 34.11 KiB, done.
Total 14 (delta 5), reused 7 (delta 1)
remote: usage: git cat-file (-t|-s|-e|-p|<type>|--textconv) <object>
remote: or: git cat-file (--batch|--batch-check) < <list_of_objects>
remote: <type> can be one of: blob, tree, commit, tag
remote: -t show object type
remote: -s show object size
remote: -e exit with zero when there's no error
remote: -p pretty-print object's content
remote: --textconv for blob objects, run textconv on object's content
remote: --batch show info and content of object standard input
remote: --batch-check show info about objects fed from the standard input
remote: error: hook declined to update refs/heads/master
To git://mylinuxbox.us.spec.com/mobile.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'git://mylinuxbox.us.spec.com/mobile.git'
Those errors indicate that you have a buggy hook installed in your remote repository. Check the hooks subdirectory in mobile.git on your remote server and look at the hooks that are enabled. It seems that the hook is misusing git cat-file at some point.