I have installed reviewboard. I added local GIT repository to it. During creation of review requests, the repository is available to be selected. But, when I am selecting a file from the repository and trying to add it as a Diff it says 'The selected file does not appear to be a diff.'. Please let me know if anyone has any answer for the question. Thanks....
git diff <filename1> ><filename2>.diff
This can be used for generating the diff file.
Some helpful tips for reviewboard are:
Log Settings:
Check/Tick - Enable logging
Log directory: /var/www/reviewboard
Log Level: Debug
Review board git configuration steps::
$ git config --global user.name "Chalpat Rauth"
$ git config --global user.email chalpat.rauth#ap.sony.com
You can veryify the entries in vim ~/.gitconfig
$ ssh-keygen -t rsa
copy the public key ./root/.ssh/id_rsa.pub to gitlab as a new key
chmod 700 -R /root/.ssh/
git clone git#gitlab.csx.sony.co.jp:testtest.git
During configuration in ReviewBoard:
Hosting service: None - Custom Repository
Repository Type: Git
Path: /var/www/reviewboard/code/testtest/.git
Note the below:
In path: /var/www/reviewboard/code/testtest/helloworld/src/test/java/com/sony/csx
git add <file_name>
git commit -m "This is second commit"
git push
git diff HEAD >DiffForReview
LDAP Settings::
Check/Tick - Allow anonymous read-only access
Authentication Method: LDAP
LDAP Server: ldap://ldap.csx.sony.co.jp
LDAP Base DN: dc=csx,dc=sony,dc=co,dc=jp
Surname Attribute: csxUsername1
Full Name Attribute: csxUsernameF
E-Mail LDAP Attribute: mail
User Mask: uid=%s
Related
Trying to use AWS Amplify to deploy a multi-repo dendron wiki which has a mix of public and private github repositories.
Amplify can be associated with a single repo but there doesn't seem to be a built-in way to pull in additional private repositories.
Create a custom deploy key for the private repo in github
generate the key
ssh-keygen -f deploy_key -N ""
Encode the deploy key as a base64 encoded env variable for amplitude
cat deploy_key | base64 | tr -d \\n
add this as a hosting environment variable (eg. DEPLOY_KEY)
Modify the amplify.yml file to make use of the deploy key
there's 2 key steps
adding deploy key to ssh-agent
WARNING: this implementation will print the $DEPLOY_KEY to stdout
disabling StrictHostKeyChecking
NOTE: amplify does not have a $HOME/.ssh folder by default so you'll need to create one as part of the deployment process
relevant excerpt below
- ...
- eval "$(ssh-agent -s)"
- ssh-add <(echo "$DEPLOY_KEY" | base64 -d)
- echo "disable strict host key check"
- mkdir ~/.ssh
- touch ~/.ssh/config
- 'echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- ...
full build file here
Now you should be able to use git to clone the private repo.
For a more detailed writeup as well as alternatives and gotchas, see here
For GitLab repositories:
Create a deploy token in GitLab
Set env variables (eg. DEPLOY_TOKEN_USERNAME, DEPLOY_TONE_PASSWORD) in amplify panel
Add this line to the amplify config
- git config --global url."https://$DEPLOY_TOKEN_USERNAME:$DEPLOY_TOKEN_PASSWORD#gitlab.com/.../repo.git".insteadOf "https://gitlab.com/.../repo.git"
I have a static site generated using Zola and I'm using GitHub Actions to do a build of my static site and publish that into a gh-pages branch of my repository. I have also configured my project to serve via GitHub pages using the gh-pages branch.
The problem I'm facing is that as soon as my GitHub action builds a new version and pushes it to the gh-pages branch, the custom domain setting in the GitHub settings gets reset.
Here is what I do in my GitHub action to build and push to TARGET_BRANCH (gh-pages) branch:
- name: Commit and push to target branch
run: |-
git config --global user.email "workflow-bot#mydomain.com"
git config --global user.name "workflow-bot"
git checkout --orphan $TARGET_BRANCH
rm -rf .github/
mv public ..
rm -rf *
mv ../public/* .
touch .nojekyll
touch README.md
echo 'https://www.bigelectrons.com - SITE GENERATED USING ZOLA' > README.md
git add .
git commit -m "generated using zola build"
git push --set-upstream origin $TARGET_BRANCH --force
Any idea what the problem is and how I could resolve th
I just had to add a CNAME file to my gh-pages branch. For example., in the run command, I had to add these two lines:
touch CNAME
echo 'mydomain.com' > CNAME
I know this is not Zola-related, but I've stumbled upon the same error when using Mkdocs.
The documentation says that you need to create a CNAME file in your docs_dir directory, so that their gh-deploy script can pick that up and copy it at the right place in the gh-pages branch (see that doc here).
For information, using the Github developer settings page to set the custom domain does exactly the same thing, ie. creating a CNAME file at the root of the gh-pages branch.
I have a git repository with git sub-module, which linked to another git repository.
main-repo
-> file1.txt
-> submodule-repo
-> file2.txt
I created a Google Cloud Build trigger that has permissions to main-repo.
In order to load the submodule-repo repository, I added this command to the build instructions:
steps:
- name: gcr.io/cloud-builders/git
args: ['submodule', 'update', '--init', '--recursive']
...
And it fail in this stage. Why? permissions problem:
Submodule 'XXX' (XXX) registered for path '***' Cloning into
'/workspace/XXX'... ssh: Could not resolve hostname c: Name or service
not known fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository
exists.
The read permission I gave Google is for the main-repo git repository. Since I can give access only for one repository, I can't give another permission for the submodule-repo repsoitory.
How I can use Google Cloud Build to build an git repository with git sub-module?
I did the following and it's working for me:
I followed these instructions to access my private repo from google cloud:
Create an SSH key
Store the private SSH key in Secret Manager
Add the public SSH key to your private repository's deploy keys (if you need to access more than one repo, create a user or use an existing user who has access to these repos and put the deploy key in this account, not in the repo itself > from GitHub account > settings > SSH keys)
Grant permissions to Cloud Build service account to access Secret Manager
Add the public SSH key to known hosts (I stored the public key as a variable in cloud build and you can use GitHub secret to store it)
*Use this command to get the public key and don't copy it from .pub file
ssh-keyscan -t rsa github.com > known_hosts.github
Then these steps in the cloud build file:
- name: 'gcr.io/cloud-builders/git'
secretEnv: ['SSH_KEY']
entrypoint: 'bash'
args:
- -c
- |
echo "$$SSH_KEY" >> /root/.ssh/id_rsa
chmod 400 /root/.ssh/id_rsa
echo ${_SSH_PUBLIC_KEY} >> /root/.ssh/known_hosts
volumes:
- name: 'ssh'
path: /root/.ssh
- name: 'gcr.io/cloud-builders/git'
entrypoint: 'bash'
args:
- '-c'
- |
git submodule init
git submodule update
volumes:
- name: 'ssh'
path: /root/.ssh
availableSecrets:
secretManager:
- versionName: projects/[GCP_Project]/secrets/[SECRET_NAME]/versions/latest
env: 'SSH_KEY'
I am trying to follow the steps on Deployment as described in the manual of Academic-Hugo. The goal is to upload the Hugo website to GitHub pages.
However the following step fails and I have no clue what the issue could be:
$ git submodule add -f -b master https://github.com/<USERNAME>/<USERNAME>.github.io.git public
Reactivating local git directory for submodule 'public'.
fatal: 'origin/master' is not a commit and a branch 'master' cannot be created from it
Unable to checkout submodule 'public'
The .gitmodules file looks like this (not sure how relevant that is though...):
[submodule "themes/academic"]
path = themes/academic
url = https://github.com/gcushen/hugo-academic.git
[submodule "public"]
path = public
url = https://github.com/<USERNAME>/<USERNAME>.github.io.git
branch = master
While <USERNAME> is my actual username of course.
I am new to Hugo and github pages and would appreciate any pointers on how to resolve this or even where to look for the root of the issue.
I had the same issue. I tried to continue on anyway and it ended up working:
site $ hugo
site $ cd public/
site/public $ git add .
site/public $ git commit -m "initial build"
site/public $ git push # After this, all is well.
I did run a git status prior to pushing, but it had a warning (don't recall the message) and suggested I remove the remote origin. I ignored that too.
Had the same issue today and landed on this site that has some useful info about deleting modules and re-doing the whole thing from start. Hope it might be useful to others as well.
In the newly created google container builder I am unable to fetch git tags during a build. During the build process the default cloning does not seem to fetch git tags. I added a custom build process which calls git fetch --tags but this results in the error:
Fetching origin
git: 'credential-gcloud.sh' is not a git command. See 'git --help'.
fatal: could not read Username for 'https://source.developers.google.com': No such device or address
# cloudbuild.yaml
#!/bin/bash
openssl aes-256-cbc -k "$ENC_TOKEN" -in gcr_env_vars.sh.enc -out gcr_env_vars.sh -
source gcr_env_vars.sh
env
git config --global url.https://${CI_USER_TOKEN}#github.com/.insteadOf git#github.com:
pushd vendor
git submodule update --init --recursive
popd
docker build -t gcr.io/project-compute/continuous-deploy/project-ui:$COMMIT_SHA -f /workspace/installer/docker/ui/Dockerfile .
docker build -t gcr.io/project-compute/continuous-deploy/project-auth:$COMMIT_SHA -f /workspace/installer/docker/auth/Dockerfile .
This worked for me, as the first build step:
- name: gcr.io/cloud-builders/git
args: [fetch, --depth=100]
To be clear, you want all tags to be available in the Git repo, not just to trigger on tag changes? In the latter, the triggering tag should be available IIUC.
I'll defer to someone on the Container Builder team for a more detailed explanation, but that error tells me that they used gcloud to clone the Google Cloud Source Repository (GCSR), which configures a Git credential helper named as such. They likely did this in another container before invoking yours, or on the host. Since gcloud and/or the gcloud credential helper aren't available in your container, you can't authenticate properly with GCSR.
You can learn a bit more about the credential helper here.