Vapor: git push heroku master is failing - swift

I've been working with Vapor and Heroku for a few weeks now and it is all going well. Vapor is fab! ;] I have been successfully updating the app on Heroku using git push heroku master until yesterday evening when I started to get this error:
$ git push heroku master
Counting objects: 26, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (24/24), done.
Writing objects: 100% (26/26), 7.37 KiB | 0 bytes/s, done.
Total 26 (delta 15), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Swift app detected
remote: Cloning into 'swiftenv'...
remote: Swift 3 Heroku Installer
remote: 🔢 Version: 3.0.2
remote: 🖥 Operating System: ubuntu1404
remote: 📦 Installing Swiftenv
remote: Cloning into '/app/.swiftenv'...
remote: 🐦 Installing Swift
remote: Downloading https://swift.org/builds/swift-3.0.2-release/ubuntu1404/swift-3.0.2-RELEASE/swift-3.0.2-RELEASE-ubuntu14.04.tar.gz
remote: /tmp/swiftenv-3.0.2- /tmp/build_577666a1ce2003bd1d820e031bc0f306
remote: % Total % Received % Xferd Average Speed Time Time Time Current
remote: Dload Upload Total Spent Left Speed
remote: 100 113M 100 113M 0 0 8057k 0 0:00:14 0:00:14 --:--:-- 8613k
remote: /tmp/build_577666a1ce2003bd1d820e031bc0f306
remote: 3.0.2 has been installed.
remote: ✅ Done
remote: precompile
remote: -----> Installing toolbox
remote: Downloading...
remote: Compiling...
remote: <unknown>:0: error: build had 1 command failures
remote: swift-build: error: exit(1): /app/.swiftenv/versions/3.0.2/usr/bin/swift-build-tool -f /tmp/build_577666a1ce2003bd1d820e031bc0f306/vapor-toolbox/.build/debug.yaml
remote: ! Push rejected, failed to compile Swift app.
remote:
remote: ! Push failed
remote: Verifying deploy....
remote:
remote: ! Push rejected to zzzzzzzz.
remote:
To https://git.heroku.com/zzzzzzzz.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/zzzzzzzz.git'
The master branch of my repo is clean and up to date with no commits pending from elsewhere (there's only be working on the code).

Hah! The guys on the Vapor Slack have sorted it. pbodsk, you were correct in that it was a Swift 3.1 issue.
You need to create a .swift-version file in the root directory of your Vapor project. The content of the file is simply:
3.1
When this is pushed to Heroku, it will compile using the correct version of Swift.
Please be aware that you'll also need to do this if you are having this issue:
vapor toolbox broken after upgrading swift

Related

Github invalid path error - unable to clone repository into GitHub Desktop

I am new to GitHub and trying to clone my team's repository into my GitHub Desktop. However, I get the following error.
Cloning into 'C:\Users\prisc\github\sex-bias\sex.bias'...
remote: Enumerating objects: 809, done.
remote: Counting objects: 100% (29/29), done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 809 (delta 8), reused 22 (delta 5), pack-reused 780
Receiving objects: 100% (809/809), 206.22 MiB | 30.22 MiB/s, done.
Resolving deltas: 100% (340/340), done.
error: invalid path 'Icon?'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
Any ideas what is happening? I've also tried cloning from the terminal and get the same error.
Thanks,
Pri

GH001: Large files detected ----> master -> master (pre-receive hook declined)

I tried to push to my repository, but I had a file greater than 100 MB and GitHub and it displayed "GH001: Large files detected", so as I didn't need the file I removed it, updated with git add . and git commit, however the error still remains, as if the file would still be in the folder and as if I haven't add and commit after removing the file.
This is what's displayed:
[...]
Delta compression using up to 8 threads
Compressing objects: 100% (795/795), done.
Writing objects: 100% (800/800), 623.93 MiB | 5.01 MiB/s, done.
Total 800 (delta 104), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (104/104), completed with 42 local objects.
remote: error: Trace: 34f648186732099e6b228feddefc1ba42161aef997a90e91e06aacda039596ea
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File Podcast/Enrachados_21_10_2021.mp4 is 501.53 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 github.com:castorx9000/UnbettingFootball.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'github.com:castorx9000/UnbettingFootball.git'

Why do i get lots of remote: when pushing to master

Lots of remote: when doing a git push origin master (this hasn't happened to me in 12 months of using git so i'm not sure whats happened here)
if you look in codeblock below there are 12+ remote:
$ git push origin master
Enumerating objects: 41, done.
Counting objects: 100% (41/41), done.
Delta compression using up to 8 threads.
Compressing objects: 100% (19/19), done.
Writing objects: 100% (21/21), 1.73 KiB | 589.00 KiB/s, done.
Total 21 (delta 16), reused 0 (delta 0)
remote: remote: remote: remote: remote: remote: remote: remote: remote: remote: remote: remote: remote: remote: remote: remote: remote: remote: remote: Resolving deltas: 100% (16/16), completed with 16 local objects.
To https://github.com/xxx/xx.git
xxx master > master

How to disable spam from github?

When I did git push I received the following console output:
Enumerating objects: 5440, done.
Counting objects: 100% (5440/5440), done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1428/1428), done.
Writing objects: 100% (5440/5440), 2.00 MiB | 454.00 KiB/s, done.
Total 5440 (delta 4009), reused 5440 (delta 4009)
remote: Resolving deltas: 100% (4009/4009), done.
remote:
remote: Create a pull request for 'master' on GitHub by visiting:
remote: https://github.com/igor-liferenko/delete-this/pull/new/master
remote:
To github.com:igor-liferenko/delete-this
* [new branch] master -> master
The question is how to configure my github profile to disable the following part?
remote: Create a pull request for 'master' on GitHub by visiting:
remote: https://github.com/igor-liferenko/delete-this/pull/new/master

Fatal Error when downloading repository

When I put this command on the command line it shows following error.
$ git pull origin branchname
remote: Counting objects: 30138, done.
remote: Compressing objects: 100% (21286/21286), done.
fatal: The remote end hung up unexpectedly2.97 MiB | 511.00 KiB/s
fatal: early EOF
fatal: index-pack failed
Please help me to resolve this problem.