Integration of Google Collaboratory with github

+1 vote
I have some repositories on github which i would want to import into Google Colab. How can i do this?
Mar 26, 2018 in Data Analytics by kurt_cobain
• 9,260 points
1,144 views

3 answers to this question.

0 votes

Just run the below command:

!git clone githubrepohtml
%cd githubrepo_folder_name
answered Mar 26, 2018 by Bharani
• 4,550 points
+1 vote

You can use SSH protocol to connect your private repo with colab

1) Generate SSH keys

2) upload it to colab

from google.colab import files
uploaded = files.upload()

3) Move the ssh kay pairs to /root and connect to git

  • remove previously ssh files
    ! rm -rf /root/.ssh/*
    ! mkdir /root/.ssh
  • uncompress your ssh files
    ! tar -xvzf ssh.tar.gz
  • copy it to root
    ! cp ssh/* /root/.ssh && rm -rf ssh && rm -rf ssh.tar.gz ! chmod 700 /root/.ssh
  • add your git server e.g gitlab as a ssh known host
    ! ssh-keyscan gitlab.com >> /root/.ssh/known_hosts
    ! chmod 644 /root/.ssh/known_hosts
  • set your git account
    ! git config --global user.email "email"
    ! git config --global user.name "username"
  • finally connect to your git server
    ! ssh git@gitlab.com
4) Authenticate your private repository
5) Use ! git@gitlab.com:{account}/{projectName}.git
note: to use push, you have to give write access for
the public ssh key that you authenticate git server with.
answered Aug 7, 2018 by Kalgi
• 41,620 points
0 votes
answered Mar 9 by TEJAS
• 150 points

Related Questions In Data Analytics

+1 vote
2 answers

Custom Function to replace missing values in a vector with the mean of values

Try this. lapply(a,function(x){ifelse(is.na(x),mean(a,na.rm = TRUE) ...READ MORE

answered Aug 14 in Data Analytics by anonymous
85 views
0 votes
1 answer

With the help of tidyverse: how to rename a column to a variable name

With the help of Dplyr: rename function ...READ MORE

answered Apr 3, 2018 in Data Analytics by DeepCoder786
• 1,720 points

edited Apr 3, 2018 by DeepCoder786 44 views
+1 vote
1 answer

How to convert a list of vectors with various length into a Data.Frame?

We can easily use this command as.data.frame(lapply(d1, "length< ...READ MORE

answered Apr 4, 2018 in Data Analytics by DeepCoder786
• 1,720 points
104 views
0 votes
2 answers

How to count the number of elements with the values in a vector?

Use dplyr function group_by(). > n = as.data.frame(num) > ...READ MORE

answered Aug 21 in Data Analytics by anonymous
• 28,040 points
118 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
180 views
0 votes
1 answer
0 votes
2 answers

Integration of R with Java

there is a package called rjava that ...READ MORE

answered Dec 4, 2018 in Data Analytics by Kalgi
• 41,620 points
42 views
+1 vote
3 answers

Problem with installation of Wordcloud in anaconda

Using Anaconda Python 3.6 version For Windows ...READ MORE

answered Aug 7, 2018 in Data Analytics by Priyaj
• 56,900 points
3,843 views