githooks,atlassian-stash , local atlassian stash server error debugging plugin


local atlassian stash server error debugging plugin

Question:

Tag: githooks,atlassian-stash

Im trying to setup a dev environment to create a git hook plugin for Atlassian stash server. When I run atlas-debug to start the web server then browse to localhost:port The Stash home page doesn't display and I get this error in the console...

[INFO] [talledLocalContainer] 2015-03-10 21:09:51,279 WARN  [threadpool:thread-15]  c.a.s.i.s.g.t.DefaultTranscodeServer GET /stash HTTP/1.1
[INFO] [talledLocalContainer] Host: localhost:52883
[INFO] [talledLocalContainer] Connection: keep-alive
[INFO] [talledLocalContainer] Pragma: no-cache
[INFO] [talledLocalContainer] Cache-Control: no-cache
[INFO] [talledLocalContainer] Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
[INFO] [talledLocalContainer] User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.76 Safari/537.36
[INFO] [talledLocalContainer] Accept-Encoding: gzip, deflate, sdch
[INFO] [talledLocalContainer] Accept-Language: en-US,en;q=0.8
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer]  could not be transcoded; ignoring request
[INFO] [talledLocalContainer] java.lang.IllegalArgumentException: The specified path, GET /stash HTTP/1.1
[INFO] [talledLocalContainer] Host: localhost:52883
[INFO] [talledLocalContainer] Connection: keep-alive
[INFO] [talledLocalContainer] Pragma: no-cache
[INFO] [talledLocalContainer] Cache-Control: no-cache
[INFO] [talledLocalContainer] Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
[INFO] [talledLocalContainer] User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.76 Safari/537.36
[INFO] [talledLocalContainer] Accept-Encoding: gzip, deflate, sdch
[INFO] [talledLocalContainer] Accept-Language: en-US,en;q=0.8
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] , does not belong to Stash and cannot be transcoded.
[INFO] [talledLocalContainer]   at com.atlassian.stash.internal.scm.git.transcode.DefaultTranscoder.transcode(DefaultTranscoder.java:52) ~[stash-scm-git-3.7.1.jar:na]
[INFO] [talledLocalContainer]   at com.atlassian.stash.internal.scm.git.transcode.DefaultTranscodeServer$TranscodeChannelHandler.transcode(DefaultTranscodeServer.java:162) [stash-scm-git-3.7.1.jar:na]
[INFO] [talledLocalContainer]   at com.atlassian.stash.internal.scm.git.transcode.DefaultTranscodeServer$TranscodeChannelHandler.run(DefaultTranscodeServer.java:138) [stash-scm-git-3.7.1.jar:na]
[INFO] [talledLocalContainer]   at com.atlassian.stash.internal.concurrent.StateTransferringExecutor$StateTransferringRunnable.run(StateTransferringExecutor.java:71) [stash-platform-3.7.1.jar:na]
[INFO] [talledLocalContainer]   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_75]
[INFO] [talledLocalContainer]   at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_75]
[INFO] [talledLocalContainer]   at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_75]
[INFO] [talledLocalContainer]   at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_75]
[INFO] [talledLocalContainer]   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_75]
[INFO] [talledLocalContainer]   at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
[INFO] [talledLocalContainer]   ... 1 frame trimmed

I'm running on Mac OSX 10.9.5 with javac 1.7.0_75

I installed the Atlassian plugin SDK with brew

brew install atlassian/tap/atlassian-plugin-sdk

created an empty plugin with

atlas-create-stash-plugin

created a default post repository hook with

atlas-create-stash-plugin-module

then started the server with

atlas-debug

and when I browse to localhost I get the error above


Answer:

seems i had a mis match in java versions. setting JAVA_HOME to the right version helped


Related:


Executing git-hooks on windows errors out


regex,windows,git,githooks,git-bash
So, I have written a simple git-hooks for pre-push which works just fine on Linux or Mac, but doesn't work on Windows. Script: Tries to match the commit message with a regular expression, and should return 0 if matches or else exit. Based on the articles I read, they say...

Stop git commit in pre-commit hook with exit


osx,git,bash,githooks,pre-commit-hook
I'm trying to stop a git commit from continuing with a pre-commit hook. From reading the manual, it should stop when you return an exit code other than 0. I'm testing to see if the csscomb command returns an error, and if it does then break the loop and exit,...

Automatically copy pushed files from one GitHub repository to another


git,github,github-api,githooks
I have two GitHub repositories. I'd like to automatically (probably using hooks and/or github API) commit and push files to the second repository when they are pushed to the first one. The second repository is not a clone of the first one, their folder layout is not necessarily the same...

Atlassian Stash - Permission Denied (publickey)


git,ssh,ssh-keys,atlassian-stash
I'm actually in the process of setting Atlassian Stash for my Workplace. I've ran into this issue which I'm not able to fix. Note, this is running on a Windows 7 64bits installation. When setting the SSH Keys, I followed the Stash Guide on how to create them and set...

Git Post-receive hook with part of work tree


wordpress,git,deployment,githooks
I would like to use git to deploy to a website to a testing server. My website is a wordpress theme built with gulp and the repository looks like theme.git/ -- gulpfile.js -- src/ -- build/ I've followed the steps explained here and here which are- set up a bare...

Git hooks in PHPStorm on Mac


osx,git,bash,phpstorm,githooks
I've got problem with commiting in PHPStorm with pre-commit hook enabled. #!/bin/sh cd "$(git rev-parse --show-toplevel)" # Message message () { if [ $2 -ne 0 ] then echo "${1}: Error" exit 1 else echo "${1}: Success" fi } # JSHint grunt lint:js &> /dev/null message "JSHint" $? # Unit...

Local Git Hook Pre-Commit/Pre-Push does not run (Windows)


git,powershell,github,githooks,pre-commit-hook
I have a repo set up which is supposed to run a fairly simple pre-push/pre-commit powershell script (It doesn't really matter when the script executes). However, for the life of me I cannot get it to run. I have tried to use chmod +x .git/hooks/* and chmod ug+x .git/hooks/* I...

How to git-diff a file against “theirs” version after resolving conflicts


git,git-merge,githooks,git-diff,pre-commit-hook
In a pre-commit hook, I want to make sure that nobody (except 1 person) is able to change restricted_file.txt The hook needs to handle the case when someone performs 'git pull' or 'git merge some_branch', obtains the latest restricted_file.txt but something_else.txt causes a conflict. He resolves the conflict and keep...

Capistrano unable to pull a Stash repository using SSH


git,ssh,capistrano,capistrano3,atlassian-stash
I followed the following procedure: Created an SSH key; Enabled SSH in Atlassian Stash; Added SSH key for the Stash account called Capistrano (already used by Capistrano to successfully connect using username and password to Stash) Tested the SSH connection using the command git clone ssh://[email protected]:7999/project/repository.git and the repository is...

Where are commit messages stored in Atlassian Stash


git,sdk,atlassian-stash
I am trying to write a plugin for Atlassian Stash. I have downloaded the SDK, and I have access to the database we use for Stash, but I am unable to find a table that has a column for commit messages. I assume that they aren't deriving that from the...

how to get a list of commits from refChanges in Atlassian Stash Pre Receive Repository Hook


atlassian-stash,atlassian-plugin-sdk
Im trying to write a stash plugin that will iterate through the commits in a change set pushed to stash in a Pre Receive Repository Hook. The API passes a Collection of refChange in the onReceive method. public boolean onReceive(RepositoryHookContext context, Collection<RefChange> refChanges, HookResponse hookResponse) if I make 3 commits...

Git push error pre-receive hook declined


gitlab,githooks
I have run gitlabhq rails server on virtual machine, following 1-6 steps from this tutorial https://github.com/gitlabhq/gitlab-recipes/blob/master/install/centos/README.md and starts rails server executing command sudo -u git -H bundle exec rails s -e production. After that I created user, using admin tools and created new project under this user. Then I'm trying...

Integrating multiple git users with Asana


git,githooks,asana,github-for-windows
I've setup a Git server according to this page. I've also incorporated a post-receive hook according to this page. I'm using GitHub for Windows to communicate between my local machine and the git repo. My issue is that the post-receive hook utilizes a variable found in git config user.asana-key. I've...

Redirecting a git push


git,jenkins,githooks,git-push,git-repo
I am currently playing with hooks to get our repositories to tell Jenkins to build, etc. I have been looking for information on how I would be able to redirect a push to another repo, or even if this is possible? So for example developer pushes to Dev repo, pre-push...

Have JIRA send mails to watchers on commit from Stash on a ticket


git,email,jira,atlassian-stash
Our workflow is as follows: Someone opens ticket in JIRA (ABC-123) Developer commits with commit message ("Do the thing, relates to ABC-123") Developer pushes to Stash server Commit will show on JIRA (and when viewed on Stash, ticket will linked to JIRA). Note: I'm not sure if the above workflow...

Failure to find com.atlassian.stash:stash-parent:pom:5.0.18


maven,atlassian,atlassian-stash
After working on jira and confluence, now working on stash. As per stash documentation i have created stash plugin but unable to convert eclipse compatible and running stash instance. pom.xml:- <?xml version="1.0" encoding="UTF-8"?> http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.example.stash</groupId> <artifactId>stash-hook</artifactId> <version>1.0-SNAPSHOT</version> <organization> <name>Example Company</name>...

Development best practices: automatically grant permission to application's new folders


project-management,githooks
Some functionalities require new folders in my application and sometimes I need to grant write permissions to those folders. At the moment, when I upload the code to production environment, I need to manually grant those permissions in the server. When another person at my development team pulls my code...

Why are Git post-receive hooks typically in bare repos?


git,githooks,git-post-receive
Most mentions of post-receive hooks that I have seen are set up in bare repos. Why is this? If I only want pushes to the master branch to get deployed to my public_html folder, and all of my pushes are going to a bare repo with a post-receive hook, doesn't...

Git post-receive hook is not executed


linux,git,githooks,git-post-receive
The following post-receive hook: #!/bin/bash echo "-> Post-receive test" is not executed when pushing to my remote repository. The remote is ssh://[email protected]:2222/home/git/repo.git (it's a VM) and works, as when I manually checkout it I see the modifications I've made. Some additional informations ... $ ls -al /home/git drwxr-xr-x 7 git...

Building a specific project within the master branch using Jenkins


git,maven,svn,jenkins,atlassian-stash
In SVN, multiple projects are organized under "trunk". During migration, these projects ended up under "Master" in Stash. I have to configure Jenkins to build one of these projects within master. The Git plugin for Jenkins requests the Repo URL along with an optional branch name. However, this doesn't apply...

How to list merge conflicts on origin that are not on local?


git,git-merge,merge-conflict-resolution,atlassian-stash
Stash is rejecting my pull request due to merge conflicts. So I create a merge branch, merge destination into the merge branch, (there's nothing to commit), push anyway and open the pull request again. Still rejected for conflicts. I've deleted and recreated 3 times, and getting the same results each...

If I'm using Atlassian Stash, can the git repo still be managed without using Stash?


git,atlassian-stash
I want to know if at some point, we decide to stop using Atlassian Stash, is it going to be possible to still access our git repos or will we be out of luck?

local atlassian stash server error debugging plugin


githooks,atlassian-stash
Im trying to setup a dev environment to create a git hook plugin for Atlassian stash server. When I run atlas-debug to start the web server then browse to localhost:port The Stash home page doesn't display and I get this error in the console... [INFO] [talledLocalContainer] 2015-03-10 21:09:51,279 WARN [threadpool:thread-15]...

Git: pre-receive hook to allow only merges and not direct commits into master


git,git-merge,githooks,git-commit
I have a problem creating a pre-receive hook on a git remote branch, doing what I want. What's the problem? Direct commits to the master branch should be not allowed. Only merges into the master branch should be allowed. Solution My solution until now is to check, if there are...

Jenkins CI Post-build Actions - How to push to Stash


git,github,jenkins,atlassian-stash
I have Jenkins set up to monitor a private GitHub repo and currently is performing builds when I commit to GitHub using the GitHub Hook. Is it possible to set up an action to then push the same code to a Stash repo using 'Post-build Actions'? So just to clarify,...

“Arguments to path.resolve must be strings” when calling 'gitbook build' from a Git hook


node.js,git,gruntjs,githooks,gitbook
I am trying to run gitbook build within a post-receive Git hook on my (Gitlab, Debian 7, virtual private) server. Basically I want to: checkout the bare repository to a temporary dir run gitbook build in that temporary dir sync with the webspace through rsync The post-receive script runs something...

Can a pre-commit Git hook zip a directory and add it to the repository?


wordpress,git,githooks
I'm doing development on a Wordpress plugin. My development directory contains a lot of development-specific stuff (e.g. Grunt files, Sass files, the git repository itself, etc.). Obviously, I don't want to distribute this folder containing all of those development files; people don't want a few MB of Grunt files when...

Getting a list of files that were committed on a specific branch (git / Atlassian Stash)


git,atlassian-stash
How can I get a list of files (or commits) that were committed on a specific branch (where the branch is already deleted)? For example, I create TEST-123 feature branch from master, do a few commits to it, push to my central repo, and merge back to master via a...

Multiple git hooks for the same trigger


git,githooks
I have a post-checkout hook that I use locally in all of my repos (it renames my tmux session to repo-name/branch-name) For a project I am working on, we just added a post-checkout hook that we're asking the whole team to use. I don't want to add my personal hook's...

Git post-receive hook for push-to-deploy only works with master


git,githooks
I have a remote bare git repository created following: @server:~$ mkdir -p /home/myuser/domain.git && chmod 770 /home/myuser/domain.git && cd /home/myuser/domain.git && git init --bare With a post-receive hook: @server:~$ nano hooks/post-receive The hook script is: #!/bin/sh git --work-tree=/var/www/domain --git-dir=/home/myuser/domain.git checkout -f It has permission to execute: @server:~$ chmod +x hooks/post-receive...

git diff not working on a bare repo, post-receive hook


git,gitlab,githooks,git-post-receive
I am working on a post-receive hook on a bare repo. I want to get the file names that are changed and pushed in this bare repo (only the latest one). To get it i am using this command. git diff --name-only HEAD^ This gives me error when I push...

Stash Git error “fatal: remote error: CAPTCHA required”


git,atlassian-stash
Attempting to pull from my Stash project, using the following commands: $ git remote add origin https://[email protected]/scm/~username/project.git $ git pull origin develop I'm prompted for my password, which I enter and then get the following error: Your Stash account has been marked as requiring a CAPTCHA to be solved before...

How to 'pipe' password to remote.update() with gitPython


python,git,python-3.4,atlassian-stash,gitpython
I am trying to write a script (probably python) that needs to fetch a remote repo (housed with Stash via git), and checkout a specific commit (based on the hash). The problem is that this needs to happen 'blindly' to the user, but it pauses for a password. I need...

Stash: is it possible to prevent direct pushes to repository?


git,atlassian-stash
We are using Atlassian Stash Git repository. We want all the team members to be able to approve pull requests to repository or some branches, but we want only several members or no one to be able to commit to repository without pull request. Also we would like to prevent...