Stash Repository/Project deletion failed and unable to add new users/groups in repositories - bitbucket-server

I have installed stash 3.2 and added the evaluation license for testing purpose. i created a project and created the repository. I was testing the various functionalities by deleting a repository and project which failed. I tried to add group to repo which also failed. seeing the below in log
2014-08-20 11:09:09,490 INFO [http-bio-17993 exec-2] admin #L9VJK8x669x260x0 gnwktx 10.178.23.278 "GET /projects/MON/repos/testing/settings HTTP/1.1" c.a.s.i.w.a.RepositoryAdminController Failed to resolve default branch. Cause: refs/heads/master is set as the default branch, but this branch does not exist
2014-08-20 11:18:04,549 INFO [http-bio-17993-exec-4] admin #L9VJK8x678x404x0 gnwktx 10.178.23.278 "GET /projects/MON/repos/testing/settings HTTP/1.1" c.a.s.i.w.a.RepositoryAdminController Failed to resolve default branch. Cause: refs/heads/master is set as the default branch, but this branch does not exist
i get the below pop up while trying to add group(permission) for a particular repo
Something went wrong while trying to serve your request. Try reloading the page.
Help is much appreciated

You need to setup a default branch.Usualy master is the default branch but your repo does not have a master . You can do 2 things
Create a master branch
Set a default branch. You can do this in the repository settings. Also if you go into admin view into your repo , it will give you a direct link where you set this

I'm the product manager for Stash. I was unable to reproduce this issue, but if it's still causing concern please don't hesitate to contact our support team.

Related

Github FTP Deploy: fatal: Not a Git project? Exiting... On GitHub Actions Tab while running the workflow

I am trying to deploy my changes to live server using GitHub via ftp workflow but it keeps on failing on
'fatal: Not a Git project? Exiting...'
FTP-Deploy-Action Error Log:
Forced mode enabled.
Auto init if needed.
Using syncroot ./ if exists.
Insecure SSL/TLS connection allowed
fatal: Not a Git project? Exiting... <------------------------- fails from here
The process '/usr/bin/git' failed with exit code 8
>
I did 'git init' as stated in helpful articles but that didn't helped.
I re-clone the git repo and pushed the changes again and still having the same issue with the repo.
It was working fine until now.
Thank you for your time.
This was due to a docker image being updated and is now resolved. See the github issue for more information https://github.com/SamKirkland/FTP-Deploy-Action/issues/345
No updates to your github action are required to use the new (patched) version.
It's allready fixed :)
See here: https://github.com/SamKirkland/FTP-Deploy-Action/issues/345#issuecomment-1353339618

Incomprehensible bug in my GitHub-Page

First, I apologize for posting this here because I imagine it's not in the right place ...: /
Here, I have a git repository on which I have a personal project, I had a little abandoned and then I plunge on it. Until now I had never had a problem but since today I have the following error:
Refused to load the image 'https://monrepo.github.io/favicon.ico' because it violates the following Content Security Policy directive: "img-src data:".
Failed to load resource: the server responded with a status of 404 (Not Found)
The problem comes (normally?) not from my code because locally I have no worries so I imagine there is a trick that blocks on the github side but what ?!
Thanks for your help! =)
Alright, it was just an inattention mistake. Before it was necessary to have a dedicated branch gh-pages but now the master branch (or any other branch) can be chosen to be the gh-page. Simply have to select it in the repository settings...
If the username differs from the repository name User/MyRepository then you have to go to the repository settings and mark GitHub Pages explicitly to publish it.
If your name matches the user then you dont need to explicitly publish it, but its done automatically considering "*.github.io".
So the format for automatic publishing is:
User/User.github.io

Pull request from feature branch to master, disappears

We are experiencing following issue while merging the pull request in our Stash repo.
Scenario:
- Developer creates a feature branch from existing "master/Dev" and submits a pull request to reviewer
- Reviewer, checks and accepts by clicking on "Merge"
- Merge goes through successfully with a new "Commit ID" on Master branch, but within couple of minutes the "Commit ID" on "Master branch" disappears (See Attached images).
- When I do it the other way (Pull request from Master to feature branch) everything works fine.
- I even tried disabling all my "SVN hooks" and I still see the issue. Even the "daemon.0.log" shows nothing.
- I am pretty sure this exception is caused by Subgit. When I shutdown the mirror I see no issues.
Can you please help us resolve the issue.
Thanks,
smandadi
Apparently, Stash recommends using "SVN mirror plugin" (Dev by Atalassian + Subgit group) over Subgit tool. Looks like the tool has some glitches while working with Atlassian Stash.
Solution:
1. When using Stash, please use "SVM mirror Plugin" instead of subgit.
2. If you have your system already setup with Subgit + Stash, then just download "SVN mirror plugin" and enable it.
(Please refer to issues.tmatesoft.com/issue/SG-100 for more info.)
Thanks Semyon for the help.

How to configure Cloudbees Jenkins to trigger build on push to Github

I tried to follow the instructions in this article:
http://developer.cloudbees.com/bin/view/DEV/GitHub+Commit+Hooks+HOWTO
But I have two problems:
It doesn't work. When I push to github nothing happens on the jenkins side. On Jenkins the GitHub Hook log says 'Polling has not run yet.'
The possible cause for this is that I can't specify the git repository as described in this image:
There is no textfield for a public key, nor the other fields. Instead I have the fields
Repository URL, Name, Refspec
Also I can specify a http url (and everything but the triggering works). But if I specify the git/ssh url as in the image I get the following error:
Failed to connect to repository : Command "git ls-remote -h
git#github.com:schauder/degraph.git HEAD" returned status code 128:
stdout: stderr: Warning: Permanently added
'github.com,207.97.227.239' (RSA) to the list of known hosts.
Permission denied (publickey). fatal: Could not read from remote
repository.
Please make sure you have the correct access rights and the repository
exists.
I copied the url from github so a typo is somewhat unlikely.
I verified that I have the github plugin installed (upgraded to version 1.5)
Any hints how to fix or at least debug the problem?
Update answering questions in the comments:
Yes I checked the checkbox 'Build when a change is pushed to GitHub' in the job configuration.
And Yes I setup the webhook in GitHub. When I click the test button there, nothing happens. When I put the url from the webhook in my browser I get a http 500 saying
Not intended to be browsed interactively (must specify payload parameter)
Plus some lengthy stacktrace.
Another Update
I checked the GIT related plugins installed on the Jenkins side. Everything showing their with GIT in the text is installed and at the most current version
Based on Git error message above, I assume you can't be authenticated. Did you add the CloudBees public SSH key on GitHub as described here?
Clarification by OP
The image referenced in the question seemed to suggest that one puts a public key from GitHub into CloudBees. But actually it is the other way round, and also all the labels seem to be changed, so it is kind of difficult to match that screenshot to what you see in CloudBees.
So what I did is this:
in the Job configuration at Cloudbees there is a Public Key (generated by CloudBee). I it in the CloudBees DEV#cloud Authorization section and labeled CloudBees Public Key. Copy that Key.
Hop over to GitHub and go to Settings > Deploy Keys. Add the key there.
go to Settings > Service Hooks > WebHook URLs. Click on the test button. You are not going to see much on the GitHub side.
Hop back to CloudBees Jenkins. From the main page of the job go to the ´GitHub Hook Log´. There you should see something like:
Started on Mar 15, 2013 8:55:14 AM
Using strategy: Default
[poll] Last Built Revision: Revision 581acde89a62317fd8dabaa3f4c6025d1c9dd413 (origin/master)
Fetching changes from the remote Git repositories
Polling for changes in
Done. Took 0.34 sec
Changes found
And your job should start.
If the last line says No Changes this means the hook worked, but you already build the current version so the build is not triggered again.
If you still have problems, have look at https://wiki.jenkins-ci.org/display/JENKINS/Github+Plugin#GitHubPlugin-TriggerabuildwhenachangeispushedtoGitHub under 'trouble shooting' it tells you how to set up logging on the jenkins side. With this I get all kind of stuff in the Jenkins SystemLog.
I've just published a tutorial on continuous integration for Play applications hosted on GitHub using CloudBees. This is intended to provide a comprehensive guide:
http://ics-software-engineering.github.io/play-example-continuous-integration/

Push to github in Zend Studio 9 error

I'm using Zend Studio 9.0.3 and I have a repository on github. I created a project from github on my local machine. I can commit things, but once I try to push to upstream, I get the following error:
Can't connect to any repository: https://github.com/xxxxx/xxxxx.git (An internal Exception occurred during push: https://github.com/xxxxx/xxxxx.git: insufficient data written)
Am I missing something?
Thanks in advance for any info!
(nb: replaced the actual url with xxxx - don't want anyone sniffing in it while it's in development =] )
edit:
I don't get that error anymore, but now Zend Studio thinks the master/origin repository is already up-to-date, while there are several commits waiting to be pushed.
I had simillar errors while creating two (or more) branches of code, then merging them, commit, and push. I guess this is caused by some bugs in git algorithm.
Solved the issue.
Steps I took to fix this:
Open Preferences -> General -> Network -> generate new SSH (RSA) key
Go to github, add the key to your keys
Removed the default revs settings that Zend studio made
Pushed to origin/master.
Success \o/