GitHub for Mac throw a Git Error when I clicked the Publish button - macos

Like the Title, it throw me a Git Error message:
2013-06-08 13:51:35.249 GitHub for Mac Login[1883:707] AskPass with
arguments: (
"/Applications/GitHub.app/Contents/MacOS/GitHub for Mac Login",
"root#192.168.1.107's password: " )
2013-06-08 13:51:35.285 GitHub for Mac Login[1883:707] Error reading
attributes for password: OSStatus 840183217
Counting objects: 3, done.
Writing objects: 33% (1/3)
Writing objects: 66% (2/3)
Writing objects: 100% (3/3)
Writing objects: 100% (3/3), 215 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
remote: error: its current branch; however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in some
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To root#192.168.1.107:/var/www/html/repository/ ! [remote rejected]
master -> master (branch is currently checked out) error: failed to
push some refs to 'root#192.168.1.107:/var/www/html/repository/' (1)
I'm a beginner of use git to control the program version, and I find something like GitHub for Mac to use easily.
What I should be in the linux server configuration?
I find some useful from
http://rogerdudler.github.io/git-guide/
How to publish files to my server?
Thank you!

The error message says that you are trying to push to a non-bare repository, i.e. a normal repository rather than one that was created (with git init --bare) to enable it to function easily as a "central" repository that can be pushed to.
If you want more guidance on how to get started with git, take a look at the question
Git for beginners: The definitive practical guide

Related

Error: Git "Error deploying the application"

I'm using Git to mount an app to Scalingo, but when I do "git push scalingo master" it shows me this:
XXXXX+AAAA#AAAA MINGW32 ~/Desktop/Scalingo (master)
$ git push scalingo master
Counting objects: 1120, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1043/1043), done.
Writing objects: 100% (1120/1120), 16.71 MiB | 1.53 MiB/s, done.
Total 1120 (delta 208), reused 0 (delta 0)
<-- Start deployment of vinumtest -->
Fetching source code
Fetching deployment cache
-----> Installing requirements with pip
You must give at least one requirement to install (see "pip help
install")
Build complete, shipping your container...
Waiting for your application to boot...
! Error deploying the application
! → Your application has stopped unexpectedly when starting
! Read the output and fix your code accordingly
! Common errors: http://doc.scalingo.com/deployment/start-
error#crashed
! Need help? Email us: support#scalingo.com
To git#scalingo.com:test.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#scalingo.com:test.git'
The actual result is that I cant do the command "git push scalingo master"
As the message in the deployment is telling you:
You must give at least one requirement to install (see "pip help install")
It seems that your requirements.txt does not contain any dependency. All the Python modules you're using should be listed in this file.
What kind of application are you trying to deploy?
Whatever is the app, you have to ensure that your application is working on your local workstation before deploying it.
Regards,
-- Léo

Cannot push git error: hook declined with remote ruby error

One day, I suddenly just cannot push to one of res (While pulling is fine). This is the error log
Writing objects: 100% (42/42), 11.23 KiB | 0 bytes/s, done.
Total 42 (delta 34), reused 0 (delta 0)
remote: /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.6.2/lib/bundler/shared_helpers.rb:2:in `require':
no such file to load-- rubygems (LoadError)
remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.6.2/lib/bundler/shared_helpers.rb:2
remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.6.2/lib/bundler/setup.rb:1:in `require'
remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.6.2/lib/bundler/setup.rb:1
remote: error: hook declined to update refs/heads/master
To http://192.168.1.140:8000/chnn/application2.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'http://192.168.1.140:8000/chnn/application2.git'
I can also create a new project and push it to gitlab just fine. Only 1 project has this problem
Ask your git repo admin with this error. It is custom git hook (mean git plugin) crash.
Okay. So in my particular case, no problem is found within the server. We were desperate and tried to push over ssh rather than http and then bam, it works again.
In the end, we do not know why and how. The question still remains:
Why we can push normally over http if create new projects
Why other
do not have this problem

Revel app with local packages in heroku

I am trying to deploy a revel app in heroku, in which I have this folder structure:
+Base
+app
+controllers
-app.go
+views
+models
-user.go
+routes
+conf
+public
+test
.godir
In app.go I try to include models and routes doing this:
import("base/app/models")
I am able to run app in local, and after I can use models.User. I had tried to make a lot of ways to import these local packages in heroku:
import("../models")
import("../models/user")
import("./app/models")
import("./base/app/models")
I don't remember now all attempts, but I am trying it for a long time and I don't know ho to do.
I am using locally go 1.6, and 1.4 when I push. And this is the trace that appears when I run git push heroku master
Counting objects: 93, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (86/86), done.
Writing objects: 100% (93/93), 11.68 KiB | 0 bytes/s, done.
Total 93 (delta 50), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Revel app detected
remote: -----> Using go1.4
remote: -----> Running: go get -tags heroku ./...
remote: can't load package: /tmp/build_02574263f0810eec437968b2e73f635d/.go/src/base/app/controllers/gorp.go:10:2: local import "../models" in non-local package
remote: ! Push rejected, failed to compile Revel app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to ndc-console.
remote:
To https://git.heroku.com/ndc-console.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/ndc-console.git'
It happens using import("base/app/models").
Any solution?? Thank you.
EDIT
I log into heroku bash (running heroku run bash) and I see the folder structure, and it is something like:
bin
dev
more...
app /*This is the base folder*/
app
controllers
views
models
routes
config
public
.go /*this is the GOPATH*/
src
github.com
golang.org
gopkg.in
base-test /* This name is because I change the original name, from base-test to base... */
/* IS IT IMPORTANT? */
/* Inside this folder the app is duplicated */
In this way I tried too import("base-test/app/models") and too including all path from root (trying absurd things).
I hope it helps to find a solution. Thanks.
Ok!!! done!!
Finally, the old name of the project was generating a problem. It seems that when I change the name of the heroku app, heroku doesn't change the name of the folder when it will be compiled... AND I need change too the content of the .godir file and set it as base-test (the old name).
So now the imports I have looks like: import("base-test/app/models").
Thank you everyone.

cant git push heroku master - buildpacks

well simply this is what i am getting;
sa#sa-VPCW11S1E:/opt/hubot/bin$ heroku buildpacks
=== young-everglades-12415 Buildpack URL
heroku/java
sa#sa-VPCW11S1E:/opt/hubot/bin$ sudo git push heroku master
Counting objects: 3, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 2.14 KiB | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Failed to detect set buildpack https://codon- buildpacks.s3.amazonaws.com/buildpacks/heroku/java.tgz
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to young-everglades-12415.
remote:
To https://git.heroku.com/young-everglades-12415.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/young- everglades-12415.git'
sa#sa-VPCW11S1E:/opt/hubot/bin$
although i did set a buildpack on the app git push failed because no buildpack detected ?
How can i resolve this, and is it actually the right steps towards deploying hubot ?
The heroku build packs still use the detection script to identify the language in use. Since Hubot is not a java project and it looks like you are using the java build pack, I suspect the detection script failed.
To fix this, try removing the buildpack.
% heroku buildpacks:remove heroku/java
After this I would try,
% git push heroku master
(Optional) I believe the rediscloud addon is needed for some scripts. You can add it with,
% heroku addons:create rediscloud
Then watch the logs heroku logs and see what happens.
There is a good deployment guide in hubot/deploying/heroku.md

I have a Git repository. I have cloned the repository,Commited my local changes. When I push my changes to the server it shows error

when i pull the chages from clone, it is reflected in server and vice versa. but when i push it shows error.
Error message:
git.exe push --progress "origin" master:master
Counting objects: 11, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 474 bytes | 0 bytes/s, done.
Total 6 (delta 3), reused 0 (delta 0)
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
remote: error: its current branch; however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in some
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To //INCHNLRDFS06/CUB Ebanking$/GIT_Ebank
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to '//INCHNLRDFS06/CUB Ebanking$/GIT_Ebank'
git did not exit cleanly (exit code 1) (1029 ms # 9/10/2014 6:43:09 PM)
If you are cloning from another user's repository, the origin remote (assuming you're pushing to origin) is linked to that user's repo.
In order to commit and push your changes, you first must fork that user's repo and clone from your fork. Doing so will set up your remote to your repo and you can commit and push as you please.
You can view your remotes in the .git/config file and correct them if you're still having trouble.

Resources