Skip to content

Instantly share code, notes, and snippets.

View bondarenkod's full-sized avatar

Dmytro Bondarenko bondarenkod

  • DevRain
  • Kyiv, Ukraine
View GitHub Profile
@bondarenkod
bondarenkod / Invoke-GitSubmodulesAuthentication.ps1
Last active April 30, 2024 15:25
Azure DevOps Git Submodules Authentication, VSTS git submodules
<#
.SYNOPSIS
Invokes authentication for Git submodules within a repository.
.DESCRIPTION
The Invoke-GitSubmodulesAuthentication function is used to authenticate Git submodules within a repository. It searches for .gitmodules files within the specified repository path and restores the submodules using the provided Personal Access Token (PAT).
.PARAMETER pat
The Personal Access Token (PAT) used for authentication.
@bondarenkod
bondarenkod / git-windows-ssh.md
Last active May 2, 2024 18:26
Git SSH: Permission denied (publickey). fatal: Could not read from remote repository.

If you encounter the following error on Windows: Permission denied (publickey). fatal: Could not read from remote repository. But at the same time, the command ssh -vT git@github.com gives you this message: Hi USER_NAME! You've successfully authenticated, but GitHub does not provide shell access.

  • Add to your environment variables: GIT_SSH_COMMAND="C:/Windows/System32/OpenSSH/ssh.exe". Ensure there's no space after the equal sign. Also, verify that the path is correct for your OS.
  • Alternatively, change the Git configuration by running: git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
@bondarenkod
bondarenkod / clean-build-agents.ps1
Created September 1, 2020 20:56
power shell script for you OSX to clean VSTS DEVOPS build agents working directories
$AGENTS_ROOT = "/Volumes/DATA/agents";
$AGENTS_NAMES = "name1",
"name2",
"name3";
foreach ($name in $AGENTS_NAMES) {
$path = "$AGENTS_ROOT/$name";
Write-Output("stopping agent: $path");
pushd $path
XAMARIN BUILD CACHE
open ~/Library/Caches/Xamarin/mtbs/builds/
rm -rf ~/Library/Caches/Xamarin/mtbs/builds/*
OS X build agent runsvc.sh
export ANDROID_HOME=/Users/$(whoami)/Library/Developer/Xamarin/android-sdk-macosx
APFS Partition
sudo diskutil eraseVolume "Free Space" %noformat% /dev/disk1s1