Commit Not Found on Bitbucket on PreReceiveRepositoryHook - bitbucket-server

I am trying to validate a file on PreReceiveRepositoryHook and been following examples from atlassion site(https://bitbucket.org/roadsidepicnic/atlassian-bitbucket-check-commits-hook) and githup project (https://github.com/hmcmanus/yaml-validator-hook), neither one work because they can not find the commit just made. Anyone else facing same issue?
CommitRequest commitReq = new CommitRequest.Builder(repository, refChange.getToHash()).build();
Commit com1 = commitService.getCommit(commitReq);

Atlassian folks helped me solve the issue, here is the snippet,
There are two remedies. Choose one of:
1.) Downgrade the version of git on your server to version 2.10.2 or older.
OR:
2.) Update to Bitbucket Server 4.13.0 or newer.
To do #2 in your first example you would adjust these values in that example's pom.xml.
From this:
4.3.2
4.3.2
To this:
4.13.0
4.13.0
more details # https://answers.atlassian.com/questions/46816348/commit-not-found-on-pre-receive-hook

Related

Moodle - Using "Old code" when I am actually using the newest version

I have had too many problems with my ubuntu moodle server, so now tried to do a factory resetting of my server and install everything anew. Even though I checked out with the newest git repo available, I am still getting the following error message:
https://imgur.com/a/raAd7VB
The branch I checked out with was 'origin/MOODLE_400_STABLE'.
Thanks in advance.
Check the value for version in your database
SELECT value
FROM mdl_config
WHERE name = 'version'
Then search for the value in the releases, this will tell you which version the database is using
https://docs.moodle.org/dev/Releases
You might need to do a git pull for the latest version of Moodle 4

What is "SwiftPM.SPMRepositoryError error 5"?

I've searched Apple's documentation, open source projects, and Google, and I cannot seem to find any information about SwiftPM.SPMRepositoryError error 5. Heck, I can't even find information about SwiftPM.SPMRepositoryError.
Does anyone know of documentation for this error or the error codes?
What worked for me was switching to ED25519 key.
I think this is happening now because of the effort to improve Git protocol security on GitHub. You can read more about it here: https://github.blog/2021-09-01-improving-git-protocol-security-github/
There you can see the timeline. The final step was put into motion on Mar 15, 2022 (coincidentally that was just two days before your question)
Changes made permanent.
We’ll permanently stop accepting DSA keys. RSA keys uploaded after the cut-off point above will work only with SHA-2 signatures (but again, RSA keys uploaded before this date will continue to work with SHA-1). The deprecated MACs, ciphers, and unencrypted Git protocol will be permanently disabled.
This helped in my case:
File -> Packages -> Reset Package Caches
File -> Packages -> Update to Latest Package Versions
This happened to me on Xcode 13.3 and 13.3.1 when my team added package dependencies that I didn't have Github access to. The error message is ambiguous and shows the same number of errors as the number of packages I have in my dependency tree. But, obtaining access to any repos that I didn't already have access to (which was a smaller number of repos than the error count) resolved the error for me.
I was able to track down the issue by attempting to add another package (anything public like swift-algorithms). Xcode gave me better error reporting in that process.
Updating swift-tools-version in Package.swift file worked for me. We've previously been using 5.3, and updating it to 5.5 or 5.6 resolved the problem.
One thing to keep in mind, Apple has deprecated the existing package declaration functions in Swift 5.6 [1], so using this version would result in a lot of new warnings.
Hopefully, this is just a temporary thing, and a proper fix is coming in the next Xcode version.
Just had the same issue.. (project based on a Package.swift file, not a regular .xcodeproj)
Doubted that it would have to do something with GitHub's policy as described above, since I've worked on other projects today without any issues.
Tried to clear the derived data folder, as well as the project's .swiftpm folder and even the swiftpm repo cache.. nothing helped.
Tried the same project on another MacBook and worked fine!
Then made a fresh clone of the project in a different folder on the Mac with the issue and worked fine as well.
So finally I just deleted the local Package.resolved file, reopened the project in Xcode and everything was back to normal 👍🏻
This seems to be the same issue as Error while fetching remote repositorygit#github.com:***/***.git: An unknown error occurred. reference 'refs/remotes/origin/master' not found (-1) in Xcode 14.
Here is a small script I made to work around it: https://stackoverflow.com/a/74130700/624854.

Android studio and GitLab - how integration?

I need use GitLab repository in my Flutter project(Android Studio).
First, I tried "New->Get from version control", but I have error:
remote: The project you were looking for could not be found or you don't
have permission to view it
I started looking for a solution on the net and only found this manual. The key step is to add the remote repository. I tried it, but have error:
maybe I need to add login/password for gitlab to Android Studio? I will try to do this, but in the settings it is not available (only git)
any advice? I will be grateful.
I found solution here - need change url for clone(add userName):
before: https://gitlab.com/gitlab_user/myrepo.git
after: https://gitlabusername#gitlab.com/gitlab_user/myrepo.git
I don't understand the problem
and then import it
If you already checked it out and you want to add a new remote, I recommend to use CLI
git remote add upstream https://git.something.info/privat/sensoric.git
Btw, in general, I recommend to use CLI to understand what you do exactly

Sourcetree not refreshing view

The view within sourcetree has to be manually updated by hitting F5 as of version 3.3.6.3829. I attempted to raise this as a bug on https://jira.atlassian.com/, but the form doesn't give me a correct option for version with 3.2 being the most up to date version available. If someone can point me to the correct place to raise this bug, it would be much appreciated.
This happened to me and the only way was to reinstall SourceTree 3.2.1, at least until the refresh bug gets fixed by Atlassian. I can't complain, it's a great tool and it's free, but this was annoying. I'm always a little apprehensive upgrading software I make, much less someone else's!
Here is the download page you can install older versions, I suggest 3.2.1, which works great! https://www.sourcetreeapp.com/download-archives
Following up: I'm on Windows and at least in my instance to get it to work all I did was:
Close SourceTree
Download 3.2.1 from the link above
Run the installer
Then I opened SourceTree and it reverted the version back by itself and I haven't had any issues since. I hope this helps!
The installer may be at fault. I found that my Source Tree short cuts didn't point to the correct "start in" folder. I thought correcting that has fixed the refresh problem, but I was wrong.

How can I set collapseRequests in my buildbot master.cfg

I try to set collapseRequests in my buildbot master.cfg, but when I add
c['collapseRequests'] = True
Error shows that "Unknown BuildmasterConfig key collapseRequests";
When I try to add collapseRequests in BuilderConfig, using
c['builders'].append(BuilderConfig(..., collapseRequests=True))
Error shows that "__init__() got an unexpected keyword argument 'collapseRequests' (traceback in logfile)"
Any suggestions?
Thanks.
Probably you are not using a version of Buildbot that supports collapseRequests. If I Google for it, I can only find references in the documentation for the development version of Buildbot. If you check that page, you'll see at the top there's a warning that the documentation is for the development version of Buildbot and there's a link to the documentation of the latest released version.
The latest released version (at the time of writing this answer) is 0.8.12 and does not support collapseRequests. What it does support is mergeRequests.