How can R-Studio access R packages from local repo - rstudio

We have installed R-Studio in Linux server which does not have access to Internet. But for R-Studio needs to download & update R-Packages as and when required.
All our desktops runs windows OS. Is there a way out to have for R-Studio from Linux server to access a local repo from where R-Packages can be downloaded ?

Absolutely. All you need to do is set up your own CRAN-like repository. You can do this conveniently with e.g. the miniCRAN package.
Once you have a repository set up, you can use the Rprofile.site file to permanently direct users to your local repository (here are instructions).

Related

Deploy the directories to remote windows server

Am using Teamcity as my CI, after checking out a repo from Github i need to deploy the files and directories to one of the remote windows machine
Note: Both my Teamcity agent and remote machine are having windows OS
Please help me to achieve the same with command line or by any of the plugins.
You can use the TeamCity Deployer plugin to gather artifacts and deploy them to a network share or FTP.
Create new network share on your target Windows machine and configure correct write permissions for the share and NTFS folder. Use the network share address in TeamCity build configuration. The machine running TeamCity agent must have access to the network share.

Git how to access repository Windows local machine?

I installed Git for Windows in order to clone and pull a project hosted on a remote Linux server.
In my repository (D:/repositories/my-project) I launch the following commands
git clone server#192.168.56.101:/var/www/web/my-project/.git
git pull origin master
So far so good. I pull the project files whenever modifications are applied on the server.
But now I'd like to pull or push from the remote server to my local repository.
I tried many things but I can't figure out how to access the repository located on my local machine.
Things like:
git pull duddy#my-pc:/d/repositories/my-project/.git master
just doesn't work, Git says:
ssh: Could not resolve hostname my-pc: Name or service not known
fatal: Could not read from remote repository.
Can someone helps me ?
First things first, I would recommend you try simply running git pull.
If this doesn't work, try running git remote -v and check to make sure that the URL for your server is listed as an origin (server#192.168.56.101:/var/www/web/my-project/.git).
Your issue is that you are inputting the URL for your local repository in your attempt to git pull.
I suggest reading the git-pull documentation to learn more about how pull works.
Basically, you need to have some service at your workstation which serves the requests. There are following options (I did not try most of them myself, just making it up from what I know):
use the windows file access. This is the easiest to setup at the windows workstation - just share the repository folder. The Linux side should somehow be able to mount windows shares (like described, for example, here: https://wiki.ubuntu.com/MountWindowsSharesPermanently). If you manage to mount your \\my-pc\repo to some /mount/my-pc-repo, then you can access it as file:///mount/my-pc-repo.
run git daemon at windows. Set up instructions are available at SO (for example, https://stackoverflow.com/a/2275844/2303202) and it pretty straightforward, but it does not have any authentication and in most cases it is reasonable to use it only for reading, so you will not be able to push to the workstation, only fetch.
set up ssh daemon and access through ssh authentication with read-write access. Git for windows installation contains the needed software (the sshd.exe binary, it is there at least for Git for Windows 2.6.0), probably there is a way to utilize it but I could not find it quickly.
set up HTTP(S) service at your workstation. I don't know if it is possible to do only with Git for Windows (it might be, with some perl module which happen to be included with it), or you should use some other software.

Go cd configuration issue

I've been having an issue trying to add github materials from a private repo on a Windows server.
I've seen lots of people suggesting how to add the ssh keys and where but on unix based systems. Haven't found anything related to Windows Servers.
I'm using Go latest release and have installed Go Server & Agent on a Windows Server 2008 with git installed.
I can connect to the private repo using Git Bash.
Whenever I try to add the materials it keeps saying Checking Connection and looks like it stays there forever.
If I use basic auth it works but I would like to make it work without exposing my password in the URL.
Is there a way to do that?
If you run Go under the default local system account, you can follow the suggestions from http://opensourcetester.co.uk/2013/06/28/jenkins-windows-ssh/ to setup the ssh keys for local system account.
If you run Go Server under a domain account (and not the default Local System account), check if you have uploaded your ssh keys to %USERPROFILE%/.ssh/ folder on the server machine, %USERPROFILE% being HOME folder for the domain user. Once you set that up, Go server would be able to pick the required keys. The same holds good for the agent machines. Just so you know, Go would not invoke Git-bash internally to run the git commands, so any setup on bash will not take effect when running git from within Go.
If you are using a windows machine to host GoCD server and agents , it does not run under a normal user account, it runs under the “Local System Account”
So even you can access your git repo from git bash (logged in as the current user),GOCD cannot access the same.
So you need to add the SSH keys for the Local System Account from your your current user.
1.First find the home directory for the Local System Account(It will not reside under C:/Users )
2.Use any remote administration tool to find the home directory- If you go with http://download.sysinternals.com/files/PSTools.zip
a)unzip and run command-line as administrator
b)PsExec.exe -i -s cmd.exe -start the tool )
c)run echo %userprofile% to get the home directory (eg:C:\Windows\system32\config\systemprofile)
3.Now you can either copy the SSH key files from current user or create a new one using ssh commands.
Try checking Connection after creating/copying the SSH keys, it will show Connection OK!

Laravel build locally and auto deploy to remote server

My web application are built on latest laravel framework with it's front end task and dependencies are managed through gulp, node, npm and bower.
My remote hosting server basically supports git only and does not support nodejs and npm. So currently I am building it locally and deploying it manually via ftp.
So, is their any tools that simply track the changes on locally build file and uploads the changes on the remote? Or may be there are better ways to do it?
What you are describing could be fixed by committing your locally built files.
If it supports git and you have ssh access - set your remote repository local machine. Commit your local build files and push to a remote repository. Pull changes from remote repository on remote server.
I had a similar situation where I was stuck with ftp and using Laravel.
To aliviate the agony of using ftp, I found this tool called dploy.
It simulates git in ftp, so you commit locally or to your remote repository, and dploy will take care of synchronizing your local build with your live server.
https://github.com/LeanMeanFightingMachine/dploy
I hope it helps.

Backup of SVN repository, located on Linux server, to Windows Client

I try to create a backup of my SVN repository, located on Linux server, from Windows command-line Subversion Client:
C:\project>svnadmin hotcopy svn://"URL_of_my_SVN_repository"/ C:/BACKUP
and receive following error:
svnadmin: E205000: 'svn://"URL_of_my_SVN_repository"/' is a URL when it should be a local path
How I can solve it? I need to initiate a backup my SVN repository from Windows PC (due to our network policy I have access to the Linux server port 3690 (SVN) only).
According to the documentation, you can't run svnadmin from a remote machine:
Since svnadmin works via direct repository access (and thus can only be used on the machine that holds the repository), it refers to the repository with a path, not a URL.
The standard approach to backing up to a remote location is to combine multiple tools:
Run svnadmin on the machine which serves svn.
Use a tool like rsync to copy that repo dump from the svn server to the machine which will be backed up.
If your network policy allows you to run an svn server on a machine, but not to schedule svnadmin backup jobs on that machine, then I think you need to re-consider your network policy.

Resources